validateLine(scriptContext)

Description

Defines the validation function that is executed before a line is added to an inline editor sublist or editor sublist.

This event can behave like a saveRecord event for line items in an inline editor sublist or editor sublist.

For an example, see SuiteScript Client Script Sample.

Returns

true if the sublist line is valid and the addition is successful.

false otherwise.

Since

Version 2015 Release 2

Parameters
Note:

The scriptContext parameter is a JavaScript object. It is automatically passed to the script entry point by NetSuite.

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

scriptContext.sublistId

string

The sublist ID name.

Version 2015 Release 2

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

Related Topics

SuiteScript 2.x Client Script Entry Points and API
fieldChanged(scriptContext)
lineInit(scriptContext)
pageInit(scriptContext)
postSourcing(scriptContext)
saveRecord(scriptContext)
sublistChanged(scriptContext)
validateDelete(scriptContext)
validateField(scriptContext)
validateInsert(scriptContext)
localizationContextEnter(scriptContext)
localizationContextExit(scriptContext)

General Notices