SuperSync Files - How to Customize File Paths Using SuiteQL

Overview

SuperSync Files version 0.3.2 introduced enhanced capabilities for managing file paths using SuiteQL queries. This feature allows for dynamic and customizable file organization within your NetSuite environment. This guide will walk you through the process of setting up and utilizing SuiteQL Query Path Configurations.

View in full screen

Prerequisites: SuperSync Files Version 0.3.2. NetSuite Administrator Access. This requires a working knowledge of SuiteQL.

Step by Step Process

  1. Navigate to SuperSync Files > Configs and select Record Type Configs.
  2. Select Edit for the record type config in need of editing.
  3. Navigate to Record Path SuiteQL Query.
  4. Enter the desired SuiteQL Query. See below for more information on how the query is structured and examples.
  5. Select Save.
  6. Perform tests to make sure the query is operating as expected.

File Path Structure

Enter a SuiteQL query which returns a single row and column names for each file path result. The column names can return path parts in separate pieces or as one single column with the full path name. If more than one row is returned by the query, rows after the first will be disregarded.

Return either the full path in a column named "full_path" or individual parts of the query path using "path_part_1", "path_part_2" etc. If separate parts are used they will be combined automatically into the full path. If a single "full_path" column is returned, a double slash, "//", must be used to separate parent and child folders in the path name.

The internal ID and type of the record can be referenced using {internalid} and {recordtype} in the body of the query. The {recordtype} property will return a string value and thus must be enclosed within single quotes in the query.

Examples

In the following example for Amazon the folders created would be:

Vendors/123 - Amazon

select 'Vendors' record_path_1
, id || ' - ' || entityid record_path_2
from vendor
where id = {internalid}

In the following example for invoices the result would be:

Customers/ABC Inc/Invoices/INV10000312

select 'Customers' record_path_1
,  c.companyname record_path_2
, 'Invoices' record_path_3
, t.tranid record_path_4
from transaction t
join customer c on c.id = t.entity
where t.id = {internalid}

Troubleshooting

Below are 2 common errors that may arise as a result of an incorrect field ID, incorrect formula or syntax errors. It is recommended to view an example record and view the field ID to make any corrections in the Folder Path Query field.

If any difficulties or issues arise, please reach out to supersync@netgain.tech for resolution.


Was this article helpful?