onAction(scriptContext)

Description

This defines a Workflow Action script trigger point.

For a script example, check out Workflow Action Script Sample.

Returns

void

Since

Version 2016 Release 1

Parameters
Note:

The scriptContext parameter is just a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

scriptContext.newRecord

record.Record

required

The new record.

You can’t use record.Record.save() here.

2016.1

scriptContext.oldRecord

record.Record

required

The old record.

You can’t use record.Record.save() here.

2016.1

scriptContext.form

serverWidget.Form

optional

The current form the script uses to work with the record (only available in beforeLoad).

2016.2

scriptContext.type

string

optional

The event type—like create, edit, view, or delete.

2016.2

scriptContext.workflowId

integer

optional

The internal ID of the workflow that’s calling the script.

2016.2

Related Topics

General Notices