validateDelete(scriptContext)

Description

Defines the validation function that is executed when an existing line in an edit sublist is deleted.

For an example, see SuiteScript Client Script Sample.

Returns

true if the sublist line is valid and the delete 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

scriptContext.lineCount

number

The number of lines to be deleted.

This property is defined only when validateDelete is triggered by the Clear All Lines button in the UI.

Version 2020 Release 2

For an example of the validateDelete 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)
validateField(scriptContext)
validateInsert(scriptContext)
validateLine(scriptContext)
localizationContextEnter(scriptContext)
localizationContextExit(scriptContext)

General Notices