NetSuite Connector Saved Search Export

The Saved Search SuiteApp allows you to export data from saved searches in a structured format. It integrates NetSuite data with external systems, generating custom reports, and backing up critical business information.

Prerequisites

  1. You must have the NetSuite Connector SuiteApp installed and configured. See, Installing from the SuiteApp Marketplace for more information.

  2. You must enable the following features in NetSuite:

    • CUSTOMRECORDS

    • SERVERSIDESCRIPTING

Installation

You can install the NetSuite Connector Saved Search SuiteApp from the SuiteApp marketplace. The Suiteapp allows you to export data from saved searches in a structured format by integrating NetSuite data with external systems. See, Installing from the SuiteApp Marketplace for more information.

Creating a Saved Search Export

You can create saved search exports to send files by SFTP. Every saved search record you create that is actively used is called a feed.

To create a saved search export:

  1. Go to Saved Search export > Saved Search export > Configuration

  2. Enter the data in all the required fields.

  3. Use the fields on the Schedule

    subtab to set the schedule of the export.

  4. On the SFTP subtab, enter the information of the SFTP server where you want to send files.

  5. Click Save.

Configuration

To configure Saved Search Export:

  1. Go to Saved Search Export > Configuration

  2. In the Saved Search Export dashboard, Click on New Saved Search Export.

  3. You can configure the Saved Search Export as per the following fields:

    Field Name

    Mandatory/ Optional

    Explanation

    NAME

    Mandatory

    Name of the Saved Search Export which can be used for searches and is displayed on reports.

    SAVED SEARCH

    Mandatory

    Saved search to be exported

    FILE NAME

    Mandatory

    Name of the file used for the exported file that will be placed on the SFTP server location.

    DESCRIPTION

    Optional

    Brief description of the saved search

    FILE TYPE

    Mandatory

    The file type of the exported file.

    GENERATE UNIQUE FILE NAME

    Optional

    When this box is checked, the timestamp is added to the entered value in File Name for every generated file on the schedule. If not checked, the new file with same File Name replaces the existing file in the server location.

    INACTIVE

    Optional

    When this box is checked, Saved search configuration will be ignored during Saved Search Export processing

    FIELD SEPARATOR

    Mandatory

    Select the field separator from the list.

    CUSTOM SEPARATOR

    Mandatory

    If custom is chosen as a Field Separator, then Enter the custom separator (only readable characters are supported).

    WINDOWS-STYLE LINE BREAKS

    Optional

    When this box is checked, CRLF line breaks replace the default line breaks (LF) in the generated file.

    UNESCAPE FIELDS (LEAVES FIELDS UNQUOTED)

    Optional

    When this box is checked, fields are not quoted in the generated file.

    EXPORT FREQUENCY

    Mandatory

    Select the desired frequency to export files.

    Weekly-File is generated once per week on a selected day and time.

    On Particular Days -File is generated on selected days of the week, on the selected time.

    Daily-File is generated every day, on the selected time.

    Time Interval -File is generated at a selected interval, for example every hour.

    1. Only one value can be selected if the Export Frequency is set to "Weekly."

    2. Multiple values can be selected if the Export Frequency is set to "On Particular Days."

    3. This field should be hidden when the Export Frequency is "Daily" or "Time Interval."

    DAY OF THE WEEK

    Mandatory

    Select the day or days of the week when you want the file to be generated.

    TIME OF THE DAY TO RUN AT

    Mandatory

    1. Select the time of day when the file is to be generated. Say for example if 12:00 PM is selected then the export process takes place at 12:00 PM on chosen Export Frequency.

    2. Difference Between Export Frequency and Time of the Day to Run At

      • The Export Frequency field defines the schedule type for the file generation, such as daily, weekly, or on particular days.

      • The Time of the Day to Run At field specifies the exact time (hour, minute, and AM/PM) when the file generation should occur for the chosen frequency. For example, if you select "Weekly" and set the time to 10:30 AM, the file will be generated weekly at 10:30 AM.

    Note:

    The time used would be the subsidiary time.

    RUN ONCE EVERY

    Mandatory

    1. Select the interval when the file is to be generated. Say for example if 15 minutes is selected then the export process takes place for every 15 minutes on chosen Export Frequency.

    2. Difference Between Export Frequency and Run Once Every

      • The Export Frequency field determines how often the file is generated, such as daily, weekly, on particular days, or at specific intervals.

      • The Run Once Every field is specific to the Time Interval option in Export Frequency. It defines the exact interval for file generation, such as every 15 minutes, 30 minutes, or 60 minutes etc. This field is only applicable when the Time Interval option is selected.

    AUTHENTICATION TYPE

    Optional

    1. Authentication can be selected from two types: Public Key Authentication or User Credential Authentication. The export process will use the selected authentication method.

    2. Public Key Authentication -Uses Private Key, SFTP Key Username and optionally, Passphrase fields for authentication

      User Credentials -Uses User Name and Password fields for authentication

    Important:

    While setting up the SFTP server details for Public Key Authentication, API secrets should be created for the below fields:

    • SFTP Server Private Key

    • Private Key Passphrase

    In case of User Credentials API, secret should be created for SFTP Server password.

    PRIVATE KEY

    Optional

    1. This field requires API Secret ID

    2. API Secret ID is pointing to a saved Private Key in API Secrets.

    3. Private Key is needed only if Public Key Authentication is used.

    SFTP KEY USERNAME

    Mandatory

    Enter the SFTP Key Username. It is only needed when public key authentication is selected.

    PASSPHRASE

    Optional

    This field requires API Secret ID. API Secret ID is pointing to a saved Passphrase in API Secrets.

    USERNAME AND PASSWORD

    Mandatory

    Enter the username and password of the SFTP server

    SERVER

    Mandatory

    Enter the SFTP server address.

    PORT

    Mandatory

    Enter the SFTP port number.

    POSTING DIRECTORY

    Mandatory

    Enter the SFTP posting directory path.

    ZIP FILE SENT TO SFTP

    Optional

    Check this box to compress the generated file into a ZIP file before posting to the SFTP location

    FILE CABINET FOLDER INTERNAL ID

    Optional

    Enter the folder ID of File Cabinet where the generated file is stored. (This is optional and should be populated only if File Cabinet export is enabled)

    SAVE TO FILE CABINET

    Optional

    When this box is checked, the generated file is also saved to the NetSuite file cabinet during Saved Search export processing

    ZIP FILE SENT TO FILE CABINET

    Optional

    Check this box to compress the generated file into a ZIP file before saving to the NetSuite file cabinet.

  4. Click Save.

Important:

The following points are important:

  • The files being uploaded to SFTP should be smaller than 90 MB and file cabinet should be smaller than 10 MB.

  • Some fields are conditionally mandatory. For example: For Weekly & Particular days schedule, DAY OF THE WEEK and For TIME OF THE DAY TO RUN AT become mandatory. For Daily schedule, TIME OF THE DAY TO RUN AT becomes mandatory. For Time Interval -> RUN ONCE EVERY becomes mandatory.

Migration from Saved Search Export Bundle

If you have the Saved Search Bundle installed, you might have to perform the migration setup to migrate saved search bundle to SuiteApp and disable Saved Search Export Scheduled Script for Saved Search Bundle. (bundle script name: SavedSearchExportScheduledScript.js)

If you are an existing customer of the Saved Search Export Bundle, you can perform the following steps to migrate to the Saved Search SuiteApp:

  1. Go to Saved Search Export > Configuration

  2. In the Saved Search Export dashboard, Click on Load Records from the Bundle to load all the records from that bundle into the SuiteApp.

  3. After the records are successfully loaded, you will get a pop-up for confirmation. Click Ok to proceed.

Follow the below mentioned steps to review and update each migrated record-

  • Inactive field: By default, all the records retrieved are marked as inactive. After making all necessary changes, you must clear the inactive field to activate the record.

  • Schedule tab: You must select the required export frequency in the Schedule tab and configure the other fields

  • SFTP tab: You can choose the authentication from any of the two options in the drop down: User Credential based Authentication or Public Key based Authentication. For User Credential based Authentication, you must provide the Username and Password, whereas for Public Key Authentication, you must provide the Private Key, SFTP Key Username, and optionally, the Passphrase.

Note:

The SuiteApp does not support the export of private saved searches and internal saved searches.

Troubleshooting Saved Search Export Errors

To identify and examine common SFTP connection errors, perform the following procedures.

Viewing Exception Logs

You can view the errors encountered on the NetSuite account in the exception logs to get more details on the error.

To view exception logs:

  1. Go to Customization > Scripting > Script Deployments.

  2. Expand the the Filters section.

  3. In the Script list, select Saved Search Export Map Reduce Script.

  4. In the results section, click View to open the script deployment record.

  5. In the script deployment record, go to the Execution Log tab.

Troubleshooting Saved Search Export Script Deployment

You can view additional diagnostic data added to what happens during script deployment by running the script in debug mode.

General Notices