afterSubmit(context)
Description |
Defines the function that is executed after a record is submitted. The afterSubmit operation is useful for performing any actions that need to occur following a write operation on a record. Examples of these actions include email notification, browser redirect, creation of dependent records, and synchronization with an external system. Notes:
This event can be used with the following context.UserEventType:
|
Returns |
void |
Since |
Version 2015 Release 2 |
Parameters
The context
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
required |
The new (or updated) record in read-only mode. To edit a record, use the record.load(options) method to load the newly submitted record. Make changes, and submit the record again. |
Version 2015 Release 2 |
|
|
required |
The old record (previous state of the record) in read-only mode. |
Version 2015 Release 2 |
|
|
string |
required |
The trigger type. Use the context.UserEventType enum to set this value. |
Version 2015 Release 2 |
For an example of the afterSubmit entry point, see SuiteScript 2.x User Event Script Sample.