Optional$metaOptionalinstallMethod?: "first install" | "demo" | "once"Optional$overrideSet properties not directly supported by this API.
OptionalactiveEnable or disable the Script Action. Defaults to false.
OptionalconditionStatement for a condition under which this script should execute. The system only parses the script field if the condition evaluates to true. If you decide to include the condition statement in the script, leave this field blank
OptionaldescriptionDocumentation explaining the purpose and function of the Script Action
Event to use for this script action. If you do not find an event for your script action that suits your purpose, you can create a new one
Unique name for your Script Action
OptionalorderOrder in which the script will be executed
OptionalprotectionControls edit/view access for other developers after the application is installed.
Script that runs when the condition you define evaluates to true. Two additional objects are available in this script:
event: a GlideRecord - the sysevent that caused this to be invoked.
If you want this first parameter on the event, use event.parm1 or event.parm2 for the second parameter.
For the date/time of the event, use event.sys_created_on.
To get the user ID that created the event (if there was a user associated), use event.user_id.current: a GlideRecord - the event scheduled on behalf of (incident for example).
Consider using a function exported from your src/server modules or using Now.include() to move the script to a separate js file
Map a record to an output folder that loads only in specific circumstances. 'first install' -> 'unload' (only loaded when plugin is first registered), 'demo' -> 'unload.demo' (only loaded when demo data is loaded), 'once' -> 'apply_once' (scripts that are only applied once)