Get SuiteQL Value WFA
Get SuiteQL Value WFA is a free workflow utility in the Topaz Harbor Admin Utilities lineup for NetSuite teams that need to fetch one value from SuiteQL inside SuiteFlow.
It is built for a common gap in workflow design: you can often express the lookup you need in SuiteQL, but there is no simple out-of-the-box workflow action that runs the query, binds parameters, and hands back a single result value.
What It Does
- Accepts three workflow action script parameters:
SuiteQL QueryParametersResult Column Name
- Runs the query with the provided bind parameters.
- Reads the first result row only.
- Returns the requested column as text.
- Matches the requested column name case-insensitively.
Best Fit Use Cases
This utility is a good fit when a workflow needs to:
- look up a related record value with SuiteQL
- fetch a status, flag, or identifier from a targeted query
- centralize a reusable query-driven lookup in workflow logic
- avoid building a larger script for a small read-only lookup
Important Return-Type Note
NetSuite workflow action scripts use a fixed configured return type on the script record. This utility is intentionally configured to return TEXT so it can stay generic.
That means:
- the workflow field receiving the output should be a text field
- numeric, checkbox, date, and other values come back as text representations
- if you need another type, store the text first and convert it with a workflow formula field or downstream workflow logic
This is the tradeoff that makes the utility broadly reusable across many workflow scenarios.
Install Paths
1) Admin Install Path (No SDF)
Best for NetSuite admins who are comfortable creating the script record manually:
- Download the script file from GitHub here.
- Upload the script file to File Cabinet.
- Create a new Workflow Action Script record.
- Set the script file and configure the three script parameters shown below.
- Set the return type to text and create a deployment.
- Store the output in a workflow text field, then convert it downstream if needed.
Parameters to Create
Use these exact labels, IDs, and field types:
| Label | ID | Type | Required |
|---|---|---|---|
| SuiteQL Query | custscript_th_gsqv_query | Long Text | Yes |
| Parameters | custscript_th_gsqv_params | Text Area | No |
| Result Column Name | custscript_th_gsqv_column | Free-Form Text | Yes |
Recommended script record values:
- Script ID:
customscript_th_get_suiteql_value - Return Type:
Text
Deployment created by the SDF project uses:
- Deployment ID:
customdeploy_th_get_suiteql_value_all
2) Developer Install Path (SDF)
Best for technical teams using SuiteCloud CLI:
- Clone the repo and move into
Get SuiteQL Value/. - Run
suitecloud project:validate. - Run
suitecloud project:deploy. - Verify the script ID, deployment ID, and parameter IDs in the target account.
Parameter Notes
SuiteQL Queryis required.Parametersis optional and uses a comma-delimited list.Result Column Nameis required.
Parameter coercion behavior:
trueandfalsebecome booleansnullbecomesnull- numeric tokens become numbers
- all other tokens stay strings
Current limitation:
- literal commas inside one parameter value are not supported by the default parser
Repository Link
View Get SuiteQL Value on GitHub