NetSuite OpenAir Script Development and Trouble Shooting Pro Tips
These tips are meant to show you ways in which to set up your NetSuite OpenAir development environment to ensure success when using NetSuite OpenAir Scripting.
Setting Up Your Scripting Environment
Navigate to your Personal Settings under the ‘Scripting Studio Options’ section:
- Check the box to ‘Display the number of logs at ‘View logs’ link’
- Change the ‘Editor Theme’ option
Top Step recommends liquibyte, as the NetSuite OpenAir default editor screen has a white background which can be hard on the eyes. Themes with darker backgrounds are easier to read for longer periods of time and allow for clearer identification of color coding.
Adjust ‘Font Size’ from the default of 11 as desired
Scripting Editor
Next navigate to Administration > Scripting Center > Scheduled scripts:
- Reorder the columns in the ‘Scheduled Scripts’ list view in the following suggested order:
1. Script | 6. Started |
2. Status | 7. Duration |
3. Log severity | 8. Next Run Time |
4. Log | 9. Run as user |
5. Schedule Time | 10. Test User |
Now navigate to the Form Scripts tab:
- Reorder the columns in the ‘Form Scripts’ list view in the following suggested order:
1. Script | 6. Event |
2. Status | 7. Test user |
3. Log severity | 8. Solutions |
4. Log | |
5. Form Name |
- This column set up includes the necessary script information in order of importance from left to right.
Next, set up the Log View by navigating to the Scheduled or Form Script tabs and selecting ‘View Log’:
- Select ‘Columns’ and reorder the columns in the following suggested order:
1. Internal ID | 4. Generated by |
2. Severity | 5. Message |
3. Timestamp | 6. User |
- Select Internal ID column to sort by Internal ID. This will sort the messages in received order.
Log Levels
Be sure to make use of logging in NetSuite OpenAir. Proper logging will help with script debugging and trouble shooting. While we recommend generously writing to the log throughout your script, do ensure you take advantage of the log levels.
Log lines will be written to the log wherever a log statement is placed in the script, but log lines will output to the log file at the log level set for the script in the Log Severity dropdown. The scripting engine will output to the log file those log messages at the severity selected and those of a higher level.
The log level by order is: Fatal, Error, Info, Warning, Debug, Trace
If the log level of Trace is selected all log lines will be output to the log, if Debug is set all log lines except for Debug will be output.
We hope that employing some or all of these Top Step scripting recommendations will enhance and optimize your experience building scripts for your NetSuite OpenAir environment!