- fieldChanged(scriptContext) :
The fieldChanged(scriptContext) entry point in client scripts in NetSuite does not explicitly return any values.
This entry point is triggered when a field on the form is changed by the user, and the script can manipulate the form in response to the change. The scriptContext parameter contains information about the event that triggered the script, such as the field that was changed and its new value.
2. lineInit(scriptContext) :
The client script entry point lineInit(scriptContext) in Netsuite does not return any values. It is a function that is executed whenever a line is selected or edited in a sublist on a NetSuite record.
The purpose of this entry point is to perform any necessary client-side logic when a line is selected or edited. The scriptContext parameter is an object that contains information about the current context in which the function is being executed, such as the sublist, line number, and field values.
3.localizationContextEnter(scriptContext) :
The localizationContextEnter(scriptContext) client script entry point in NetSuite does not return any values.
This entry point is used to set the localization context for the script, which allows you to retrieve localized strings and messages in the user’s preferred language. The scriptContext parameter is an object that provides information about the script’s execution context, and the localizationContextEnter() function is used to set the desired localization context.
4.localizationContextExit(scriptContext) :
The client script entry point localizationContextExit(scriptContext) in Netsuite does not return any values. It is used to perform operations when a user exits a localized context.
This entry point is triggered when the user switches to a different language or locale in NetSuite. The scriptContext parameter is an object that contains information about the current script execution context, such as the record type, record ID, and current user.
The pageInit(scriptContext) client script entry point in NetSuite does not return any values.
It is used to initialize client scripts that are attached to a NetSuite record page. This entry point is triggered when the page is initially loaded or reloaded. The scriptContext parameter is an object that provides information about the context in which the script is being executed, such as the current record being viewed or edited.
The client script entry point postSourcing(scriptContext) in NetSuite does not return any values.
This entry point is triggered after a field on a record has been sourced with a value. The scriptContext parameter contains information about the current record, the current field, and the value that has been sourced. The postSourcing function is commonly used to manipulate the value that has been sourced or perform additional actions based on the sourced value.
The saveRecord(scriptContext) function in a client script entry point in NetSuite can return a value. The return value will determine whether the record is saved or not.
If the saveRecord function returns true, then the record will be saved, and if it returns false, then the record will not be saved.
8.sublistChanged(scriptContext) :
The sublistChanged(scriptContext) entry point in NetSuite client scripts does not return any values. It is a function that gets called automatically when a sublist on a record page is changed.
The scriptContext parameter passed to sublistChanged is an object that contains information about the current script execution context, including the sublist that was changed, the current record being edited, and the field that was changed. This information can be used to perform custom logic or update other fields on the record, but the function itself does not return any values.
9. validateDelete(scriptContext) :
The validateDelete(scriptContext) client script entry point does not return any values.
This entry point is used to validate if a record can be deleted or not, and to perform any necessary actions before the record is deleted. If the validation fails, the record deletion will be prevented.
The scriptContext parameter provides information about the record being deleted and the user who initiated the deletion. It can be used to access and modify the record data, as well as to control the deletion process.
10. validateField(scriptContext)
The validateField(scriptContext) entry point in Netsuite client scripts does not return any values. Its purpose is to perform field validation logic and show error messages if needed.
The validateField(scriptContext) function receives a single parameter scriptContext, which is an object containing information about the current field being edited, including its old and new values. The function can modify the field value or display an error message using N/ui/message module functions such as message.create() or message.show().
If the validation fails and an error message is displayed, the field value will not be saved until the user corrects the error. If the validation succeeds, the field value will be saved as usual.
11. validateInsert(scriptContext) :
The validateInsert(scriptContext) entry point in client scripts in NetSuite does not return any values.
The validateInsert(scriptContext) function is called when a new record is being created in NetSuite. It allows you to perform validation on the new record before it is saved to the database. If there are any errors or warnings, you can use the N/ui/message module to display them to the user.
12. validateLine(scriptContext) :
The validateLine(scriptContext) entry point in NetSuite client scripts is used to validate a line item on a record before it is saved. This function does not return any value by default, but it can be used to throw an error message or display a message to the user using the alert() function.