Scenario: Hardcoding values in the script (e.g., folder ID) is not best practice. Store such values in a script record field and fetch them using the runtime module. Steps: Add the folderID as a parameter in the script record. Give the folderID value in the script deployment Using runtime module get the folderID
Tag: runtime module
runtime.ContextType
Holds the execution context values for script triggers Supported script types – Client & Server side scripts Module – N/runtime module //Add additional code … if (runtime.executionContext !== runtime.ContextType.USEREVENT) return; … //Add additional code
Use N/runtime Module in Netsuite for User Details
Netsuite N/runtime module provides methods to get the user inside the script, these are very useful if you want to set the current logged-in user into any field on record or if you want to use the email id of the current user, etc. ** Please Note: If the user event script or suitelet script is triggered… Continue reading Use N/runtime Module in Netsuite for User Details
Add a Log when the User View a Record.
By using a user event script, add a log on the user record in its view mode.