RE: What exactly does the customScriptId option do on query.runSuiteQL?
The NetSuite help center does not give much detail about what it does.
Example from the help center:
// Add additional code ... var results = query.runSuiteQL({ query: 'SELECT customer.entityid, customer.email FROM customer WHERE customer.isperson = ?', params: [true], customScriptId: 'myCustomScriptId' }); ... // Add additional code
The customScriptId option on query.runSuiteQL is a unique identifier that can be used to identify the query if it causes performance issues. This can be helpful for NetSuite support to troubleshoot and resolve any performance issues.
To use the customScriptId option, simply pass a unique string value to the options parameter when calling query.runSuiteQL. For example:
var results = query.runSuiteQL({
query: 'SELECT customer.entityid, customer.email FROM customer WHERE customer.isperson = ?',
params: [true],
customScriptId: 'myCustomScriptId'
});
If the query causes performance issues, NetSuite support can use the customScriptId to identify the query and to troubleshoot and resolve the issue.
It is important to note that the customScriptId option is not required. However, it is recommended to use the customScriptId option when running SuiteQL queries, especially if the queries are complex or if they are expected to return a large amount of data.
Chris Abbott
I’ve had a look round but have no idea. Perhaps something for a future feature, maybe in APM?