query.delete(options)
Method Description |
Deletes an existing query. Use this method to delete a query definition that was previously created using the SuiteAnalytics Workbook UI. After the query is deleted, it is no longer available and cannot be modified or executed.
Important:
The N/query module lets you create and run queries using the SuiteAnalytics Workbook query process. You can use the N/query module to load and delete existing queries, but you cannot save queries. You can save queries using the SuiteAnalytics Workbook interface. For more information, see Navigating SuiteAnalytics Workbook. |
Returns |
void |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
5 units |
Module |
|
Sibling Module Members |
|
Since |
2018.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The script ID of the query to delete. |
Errors
Error Code |
Thrown If |
---|---|
|
A query with the specified ID cannot be deleted because the query does not exist or you do not have permission to delete it. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.
// Add additional code
...
query.delete({
id: 'custworkbook237'
});
...
// Add additional code