SuiteScript is a powerful tool to extend NetSuite’s core functionality or to automate customer-specific processes. With all scripting however, the potential exists for errors to come up. I’m going to show you how to do some basic script trouble-shooting.

First off, to know which scripts affect which records, go to Customization > Scripting > Scripted Records

When you open a record, you’ll see which scripts are deployed for a particular record type and which ones are active. Those where the status of Released and Deployed is checked are the active ones.

If you wanted to isolate which particular script is not working, Un-tick Deployed on all the scripts on the Scripted record. Make sure that when you do this, no one else is using the system. It is a good practice to take note which ones are deployed and released so you can put it back after you finished testing. Once you have undeployed the scripts, “run” the record (in the case above create a Sales Order record as normal). If no errors are encountered, then it’s not a NetSuite core issue. Go back to your scripted record and deploy one of the scripts and run your transaction again as normal. If still no errors, go back to your scripted record and deploy another one. Repeat this process until you find the script causing the error.

To check on a particular script go to Customization > Scripting > Scripts

You can filter it out by type so you won’t be overwhelmed with the number of scripts

Note: Those with Bundle IDs are from a vendor. If you encounter any script errors from their bundle, you have to report it to the respective vendor. Other vendors may not have a bundle installed but they have their name as the prefix on the script name.
To view errors by a particular script, you can click on View beside the script name and check under Execution Log. All script logs are recorded here but this one gets usually cleared automatically by NetSuite within the day.

To view a particular log for a specific period, create a saved search and select Server Script Log.
You can put in the following criteria:
Type = Error
Date = set your own date range
You may add additional filters as required.
Under the Results tab:

Set the Date as an Available Filter so you can set the search dates on the results page. Click Save & Run.
This will redirect you to the results page and show you all the scripts that may have errors.