SuiteScript 2.x scripts offer developers a flexible choice between SuiteScript 2.0 and SuiteScript 2.1 versions, enabling them to tailor their development approach to their specific needs. While both iterations share core syntax and functionalities, SuiteScript 2.1 introduces notable enhancements and optimizations, enhancing performance and compatibility.
For those seeking to maintain their current SuiteScript Version configuration while still leveraging either SuiteScript 2.0 or 2.1 in their account, NetSuite provides a straightforward solution through its user interface.
To adjust this preference:
1.Access the NetSuite UI and navigate to Setup > Company > General Preferences.
2.Within the settings, locate the "Execute SuiteScript 2.X Server Scripts As" field.
3.Select your desired SuiteScript 2.x version from the available options.
It's essential to note that this preference setting applies universally to all scripts tagged with an "@NApiVersion" value of 2.x. By following these steps, developers can seamlessly align their scripting environment with their preferred SuiteScript version, ensuring optimal functionality within their NetSuite account.
/**
* @NApiVersion 2.x
* @NModuleScope SameAccount
*/
To know more about deploying SuiteScript, check these New to NetSuite Articles.
Do you have another way on how to execute a specific SuiteScript version? Feel free to share them here!
If you find this information useful, let us know by reacting or commenting on this post! Thank you!