Six Tips for Building Robust Customizations with SuiteScripts
- Support Maintainability. Save lots of headaches by incorporating simple naming conventions with script types having multiple event functions. Align script function names with their event. For example, name a script function afterSubmit in support of an After Submit event. The end result is that you can easily find the event functions when perusing a script file, without the need to refer to the script record.
- Optimize Performance. After Submit functions of user event scripts can slow down response time as end users save records because the functions are executed synchronously. Get around the issue by offloading intensive processing during After Submit to scheduled scripts via nlapiScheduleScript. Scheduled script execution becomes asynchronous relative to your user events. Another performance trick is to filter execution of your user event scripts to applicable execution context. Check out nlobjContext for more on this.
- Bruce Tanenholtz, Program Manager of Technical Curriculum, NetSuite
comments powered by
Posted on Wed, November 27, 2013
by NetSuite filed under