What exactly does the customScriptId option do on query.runSuiteQL?

The NetSuite help center does not give much detail about what it does.

https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_157960542026.html#subsect_157960542543

 

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
Rookie Asked on April 7, 2023 in SuiteScript.

I’ve had a look round but have no idea. Perhaps something for a future feature, maybe in APM?

on April 14, 2023.
Add Comment
1 Answer(s)
Best answer

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.

Beginner Answered on October 12, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor