NetSuite Saved Search (Archive)

Summary:

DataBlend uses NetSuite RESTlet functionality to run a saved search and collect the results. For this to work, a NetSuite administrator must create the saved search and RESTlet, and then a DataBlend user can configure the collector.

These instructions assume the saved search has already been configured.

Configure the RESTlet

  File Modified

JavaScript File saved-search.js This is the latest RESTlet script to be used in Netsuite in order to collect data into DataBlend

Jan 21, 2022 by Amanda Schertzer

JavaScript File DataBlend.NetSuite.RESTlet.js This is an outdated version of the RESTlet script

Jan 21, 2022 by Amanda Schertzer

JavaScript File bulk-export.js This script is used to enable the Bulk Export collectors and data targets

Apr 13, 2022 by Amanda Schertzer
  1. Download the DataBlend saved search RESTlet from the link above.

  2. From the Customization menu, create a new script.

     

  3. Mouse over the downward chevrons and then click the '+' button.

  4. Enter a file name, select the script file downloaded earlier and save the record.

     

  5. Create the script record.

  6. Select RESTlet as the script type.

     

  7. Enter a name for the script.

  8. Enter GetSavedSearch in the Get Function field.

  9. Save and Deploy the script.

     

  10. Set the deployment status to Released and set the security access as appropriate, then save to deploy the script.

     

  11. Note the External URL for the DataBlend collector configuration.

 

Find the ID of the Saved Search

  1. Use the Report → Saved Searches menu option to open the list of NetSuite saved searches.

    Identify the internal id of the search results to be collected by DataBlend.

     

Configuring the Collector in DataBlend

  1. Add a new collector.

     

  2. Complete the configuration fields and save the collector.

Field

Required/ Optional

Comments

Field

Required/ Optional

Comments

Type

Required

NetSuite

Name

Required

Free-text.

Data Source

Required

Select from list of configured data sources. Data sources are configured separately.

Schema

Required

Free-text. Used when writing queries against the collected data. If a schema with this name does not already exist, one will be created under the selected data source.

Credential

Required

Select from the list of configured NetSuite credentials.

NetSuite Collector Type

Required

Select Saved Search.

URL

Required

The URL of the deployed RESTlet.

Search Id

Required

The Internal Id of the saved search.

Flatten Results

Optional

Default is true.

3. Use the Collect Now button to run the collection and initialize the schema.

Flattening Results

Some columns from a NetSuite Saved Search will be returned as embedded objects; a single column may itself include several related fields. In the example below, the collector’s Flatten Results value is “false”; in the collected data account and department are embedded objects while amount is a simple value.

Flattening the collected data places each field of each embedded object in its own column making it easier to query. In the example below, the collector’s Flatten Results value is “true”; the nested fields from each object are placed in their own columns.