Free Utilities

Get SuiteQL Value WFA

Free NetSuite workflow action utility that runs a SuiteQL query and returns one named value from the first result row.

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 Query
    • Parameters
    • Result 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:

  1. Download the script file from GitHub here.
  2. Upload the script file to File Cabinet.
  3. Create a new Workflow Action Script record.
  4. Set the script file and configure the three script parameters shown below.
  5. Set the return type to text and create a deployment.
  6. 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:

LabelIDTypeRequired
SuiteQL Querycustscript_th_gsqv_queryLong TextYes
Parameterscustscript_th_gsqv_paramsText AreaNo
Result Column Namecustscript_th_gsqv_columnFree-Form TextYes

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:

  1. Clone the repo and move into Get SuiteQL Value/.
  2. Run suitecloud project:validate.
  3. Run suitecloud project:deploy.
  4. Verify the script ID, deployment ID, and parameter IDs in the target account.

Parameter Notes

  • SuiteQL Query is required.
  • Parameters is optional and uses a comma-delimited list.
  • Result Column Name is required.

Parameter coercion behavior:

  • true and false become booleans
  • null becomes null
  • numeric tokens become numbers
  • all other tokens stay strings

Current limitation:

  • literal commas inside one parameter value are not supported by the default parser

View Get SuiteQL Value on GitHub

Want Help Installing or Extending It?