saveRecord(scriptContext)

Description

This function runs when you save a record, after you click submit but before the form is sent.

You can use this function to:

  • Show alerts before saving the data.

  • Turn on fields that were turned off by other functions.

  • Redirect the user to a specified URL.

For an example, see SuiteScript Client Script Sample.

Returns

true if the record is valid and is saved.

false otherwise.

Since

Version 2015 Release 2

Parameters
Note:

The scriptContext parameter is a JavaScript object. NetSuite automatically sends it to your script's entry point.

Parameter

Type

Description

Since

scriptContext.currentRecord

currentRecord.CurrentRecord

The current form record.

For more information about CurrentRecord object members, see CurrentRecord Object Members.

Version 2015 Release 2

For an example of the saveRecord entry point, see SuiteScript Client Script Sample.

Related Topics

General Notices