Class: ScriptJob

$k. ScriptJob

new $k.ScriptJob()

Represents a script job

Methods

insert()

Add the job to the job queue

setFunctionName(functionName)

Set the name of the function to call. The script will be run as global script if no function name is set.

Name Type Description
functionName string

Name of the function to call

setParameters(parameters)

Sets the parameters passed to the script. If a function is specified, then the parameters are passed as the first argument. If no function is specified, then the variables will be added to the global context

Name Type Description
parameters object

Parameters object

setScript(scriptID)

Set the script

Name Type Description
scriptID string

Registered ID of the script

setUser(User)

Set the user. If not set, the current user will be set on insert().
Note: setting a different user is allowed only if elevatedDo() is allowed in this context, otherwise an access denied exception is thrown

Name Type Description
User