SuiteScript 2.x Client Script Entry Points and API

Script Entry Point

Description

fieldChanged(scriptContext)

This is the function that runs when a user or client changes a field.

lineInit(scriptContext)

This function runs when a line is set up, like when you select an existing line or add a new one.

localizationContextEnter(scriptContext)

This function runs when the record enters a specific localization context, as set in the script deployment record.

localizationContextExit(scriptContext)

This function runs when the record exits that context.

pageInit(scriptContext)

This function runs when the page finishes loading or the form is reset.

postSourcing(scriptContext)

This function runs when you change a field that gets its info from another field. Executes on transaction forms only.

saveRecord(scriptContext)

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

sublistChanged(scriptContext)

This function runs after you add, remove, or edit a sublist.

validateDelete(scriptContext)

This function checks if it's okay to delete a line from an edit sublist.

validateField(scriptContext)

This function checks if a field change is valid when a user or client makes a change.

validateInsert(scriptContext)

This function checks if it's okay to add a new line to an edit sublist.

validateLine(scriptContext)

This function checks if it's okay to add a new line to an inline editor sublist before it happens.

Related Topics

General Notices