<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=6889170&amp;fmt=gif">
Skip to content
  • There are no suggestions because the search field is empty.

ScriptContext Class | Methods

The ScriptContext type exposes the following members.

Methods

Name Description
pubMethod AddMessage(String) Adds a information-level log message to be consumed.
pubMethod AddMessage(DocumentItem, String) Adds a information-level log message to be consumed.
pubMethod AddWarning(String) Adds a warning level log message to be consumed.
pubMethod AddWarning(DocumentItem, String) Adds a warning level log message to be consumed.
pubMethod CreateDocument Adds a new document into the project.
pubMethod CreateField(String) Creates the given field name if it does not exist.
pubMethod CreateField(String, ChoiceFieldItemType) Creates the given field name as choice or multi-choice if it does not exist.
pubMethod CreateField(String, FieldItemType) Creates the given field name using the provided FieldItemType if it does not exist.
pubMethod CreateFieldSet Create field set with given collection of fields
pubMethod DeleteField Deletes the field from the project schema.
pubMethod Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
pubMethod GetCustomFields Gets a list of the custom (User) fields available to the script.
pubMethod GetDocuments Gets a new list of documents based on the documents already available in this context.
pubMethod GetField Gets the FieldItem for the given field name.
pubMethod GetFields Gets a list of every field available to the script.
pubMethod GetFieldSet(FieldSetItemType) Gets the field set matching the given field set type.
pubMethod GetFieldSet(String) Gets a field set matching the given field set name.
pubMethod GetFieldSets Gets all the FieldSetItem's available in the project.
pubMethod GetHashCode Serves as the default hash function.
(Inherited from Object)
pubMethod GetNewDocument Gets a new document that can be added to the project.
pubMethod GetNewDocuments Gets the list of new documents that have been created by the script.
pubMethod GetOrCreateField(String, ChoiceFieldItemType) Gets or creates the field matching both the given name and choice type.
pubMethod GetOrCreateField(String, FieldItemType) Gets or creates the field matching both the given name and field data type.
pubMethod GetProject Gets the active project associated to this instance.
pubMethod GetRemovedDocuments Gets the list of documents to remove that have been flagged deleted by the script.
pubMethod GetType Gets the Type of the current instance.
(Inherited from Object)
pubMethod HasField Checks if the given field name exists in the list of fields.
pubMethod ReadDocument() Reads through the list of documents available to this instance.
pubMethod ReadDocument(DocumentItem) Marks the document as being read by the script. Primarily used for progress updates.
pubMethod RemoveDocument Flags the document as being removed by the script.
pubMethod RenameField Renames the given field in the schema.
pubMethod ThrowIfCancellationRequested Throws a OperationCanceledException if cancellation is requested.
pubMethod ToString Returns a string that represents the current object.
(Inherited from Object)
pubMethod TryConvertFieldType 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.
pubMethod TryGetOrCreateField(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.
pubMethod TryGetOrCreateField(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.
pubMethod UpdateDocument Marks the document as having changes and updates the progress.

See Also

Reference
ScriptContext Class
Compiled.EDD.Scripting Namespace