Click or drag to resize

ScriptContext Methods

The ScriptContext type exposes the following members.

Methods
  NameDescription
Public methodAddMessage(String)
Adds a information-level log message to be consumed.
Public methodAddMessage(DocumentItem, String)
Adds a information-level log message to be consumed.
Public methodAddWarning(String)
Adds a warning level log message to be consumed.
Public methodAddWarning(DocumentItem, String)
Adds a warning level log message to be consumed.
Public methodCreateDocument
Adds a new document into the project.
Public methodCreateField(String)
Creates the given field name if it does not exist.
Public methodCreateField(String, ChoiceFieldItemType)
Creates the given field name as choice or multi-choice if it does not exist.
Public methodCreateField(String, FieldItemType)
Creates the given field name using the provided FieldItemType if it does not exist.
Public methodCreateFieldSet
Create field set with given collection of fields
Public methodDeleteField
Deletes the field from the project schema.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetCustomFields
Gets a list of the custom (User) fields available to the script.
Public methodGetDocuments
Gets a new list of documents based on the documents already available in this context.
Public methodGetField
Gets the FieldItem for the given field name.
Public methodGetFields
Gets a list of every field available to the script.
Public methodGetFieldSet(String)
Gets a field set matching the given field set name.
Public methodGetFieldSet(FieldSetItemType)
Gets the field set matching the given field set type.
Public methodGetFieldSets
Gets all the FieldSetItem's available in the project.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNewDocument
Gets a new document that can be added to the project.
Public methodGetNewDocuments
Gets the list of new documents that have been created by the script.
Public methodGetOrCreateField(String, ChoiceFieldItemType)
Gets or creates the field matching both the given name and choice type.
Public methodGetOrCreateField(String, FieldItemType)
Gets or creates the field matching both the given name and field data type.
Public methodGetProject
Gets the active project associated to this instance.
Public methodGetRemovedDocuments
Gets the list of documents to remove that have been flagged deleted by the script.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasField
Checks if the given field name exists in the list of fields.
Public methodReadDocument
Reads through the list of documents available to this instance.
Public methodReadDocument(DocumentItem)
Marks the document as being read by the script. Primarily used for progress updates.
Public methodRemoveDocument
Flags the document as being removed by the script.
Public methodRenameField
Renames the given field in the schema.
Public methodThrowIfCancellationRequested
Throws a OperationCanceledException if cancellation is requested.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryConvertFieldType
Attempts to convert the provided field to a new field type. A return value indicates whether the field was converted successfully to the new field type.
Public methodTryGetOrCreateField(String, ChoiceFieldItemType, FieldItem)
Gets or creates the field matching both the given name and choice type. A return value indicates an existing field with type was found or a new field instance was created successfully.
Public methodTryGetOrCreateField(String, FieldItemType, FieldItem)
Gets or creates the field matching both the given name and field type. A return value indicates an existing field with type was found or a new field instance was created successfully.
Public methodUpdateDocument
Marks the document as having changes and updates the progress.
Top
See Also