Helper operations for scripts

The helper operations can be used with any Object Type for the script. It contains utility helper methods for scripts.

Type helper. to access the operations, which are described in the following table.

Operation Description
createPlainText(text)

Creates a text object that can be used for fields that support plain or rich-text formats.

createRichText(“<div>html content</div>”)

Creates a rich text object that can be used for fields that support a rich text format. Use it to set TEXTAREA field values to support rich text.

fail(message)

The method can fail the execution of a script for custom business validation and return a message. The whole transaction is canceled and changes are not saved.

findIncidents(query)

Returns a list of incidents based on the match and sort criteria in the specified query argument. All returned incidents are read-only; therefore, any changes to these incidents after the script starts are not reflected upon script completion. This argument is provided by the output of query_builder.build(). See Query builder operations for details.