Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

query.load.promise(options)

{query}.load.promise({id: {string*}}).then(function(response){// DO SOMETHING WITH RESPONSE HERE}, function(error){// DO SOMETHING WITH ERROR HERE});

N/query Module
query.load.promise()
Method Description: Loads an existing query asynchronously as a query.Query object. Use this method to asynchronously load a query definition that was previously created using the SuiteAnalytics Workbook UI. After the query is loaded, you can modify the query definition (for example, by setting additional property values), join the query definition with other query types, and execute the query in the same way as queries that you create using query.create(options). You can provide either the workbook ID or the dataset ID of the query definition to load. You can obtain these IDs in the SuiteAnalytics Workbook UI. For more information, see Navigating SuiteAnalytics Workbook. This method loads only the table view in the specified workbook. However, a workbook can include no table views, or it can include multiple table views. This method throws an exception in each of these cases (see Errors). If a workbook includes multiple table views, you can use query.listTables(options) to determine the ID of a specific table view. You can use this ID to load the corresponding table view. The N/query module lets you create and run queries using the SuiteAnalytics Workbook query engine. 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. The parameters and errors thrown for this method are the same as those for query.load(options). For more information on promises, see Promise Object.
Returns: Promise Object
Synchronous Version: query.load(options)
Supported Script Types: Client and server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 5 units
Module: N/query Module
Sibling Module Members: N/query Module Members
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=query.load.promise(options)