pageInit(scriptContext)
Client scripts only run in edit mode. If you've got a deployed client script with a pageInit entry point, it doesn't run when you view the form. It runs when you click Edit.
Description |
This function runs after the page loads or when the form is reset. You can use this function to:
For an example, see SuiteScript Client Script Sample. |
Returns |
void |
Since |
Version 2015 Release 2 |
Parameters
The scriptContext
parameter is a JavaScript object. NetSuite automatically sends it to your script's entry point.
Parameter |
Type |
Description |
Since |
---|---|---|---|
|
The current form record. For more information about CurrentRecord object members, see CurrentRecord Object Members. |
Version 2015 Release 2 |
|
|
string |
The mode in which the record is being accessed. The mode can be one of these:
|
Version 2015 Release 2 |
For an example of the pageInit entry point, see SuiteScript Client Script Sample.
Related Topics
- SuiteScript 2.x Client Script Entry Points and API
- fieldChanged(scriptContext)
- lineInit(scriptContext)
- postSourcing(scriptContext)
- saveRecord(scriptContext)
- sublistChanged(scriptContext)
- validateDelete(scriptContext)
- validateField(scriptContext)
- validateInsert(scriptContext)
- validateLine(scriptContext)
- localizationContextEnter(scriptContext)
- localizationContextExit(scriptContext)