In order to fetch the execution context, use the ‘N/runtime’ module. Use the runtime.executionContext property to determine the execution context of a script. To check whether the execution context is CSV, write the code below. let isCsvContext = runtime.executionContext === runtime.ContextType.CSV_IMPORT; If the execution context is CSV, the value of isCsvContext will be true; otherwise,… Continue reading Suitescript code to check whether the execution context is CSV import.
Tag: execution context
To run a script based on the execution context – CSV Import
runtime.executionContext Execution contexts provide information about how a script is triggered to execute. For example, a script can be triggered in response to an action in the NetSuite application, or an action occurring in another context, such as a web services integration. You can use execution context filtering to ensure that your scripts are triggered… Continue reading To run a script based on the execution context – CSV Import