Display Values from the Transaction Record Using SuiteQL BUILTIN.DF

When working with the Transaction record in SuiteQL, some fields return internal values that are not easily understood at a glance. For example:

  • The Status field may return a single-letter code.
  • Fields like EntityEmployee, and LastModifiedBy return internal IDs.
  • The Type field displays abbreviations like SalesOrd or PurchOrd.

These internal values are meaningful to the system but not very useful to end users or admins reviewing query results.

To improve readability, you can use the BUILTIN.DF() function, which translates internal IDs and codes into display-friendly (DF) values—such as customer namesemployee names, or transaction types.

Here’s an example query that pulls data from the Transaction record using BUILTIN.DF() for better readability:

SELECT
TranID AS TransactionID,
TranDate AS TransactionDate,
BUILTIN.DF(Type) AS Type,
BUILTIN.DF(Status) AS Status,
BUILTIN.DF(Entity) AS Entity,
BUILTIN.DF(Employee) AS Employee,
BUILTIN.DF(Lastmodifiedby) AS ModifiedBy,
BUILTIN.DF(Lastmodifieddate) AS DateModified
FROM
Transaction

What this query does:

  • Shows readable transaction types like “Sales Order” instead of SalesOrd.
  • Displays names for the EntityEmployee, and now Last Modified By instead of just internal IDs.
  • Improves the usability of your queries, especially when presenting or debugging data.

This tip is especially helpful when building reports or dashboards that need to be easily understood by users who aren’t familiar with internal ID values.

Leave a comment

Your email address will not be published. Required fields are marked *