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 Entity, Employee, 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 names, employee 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 Entity, Employee, 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.
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
We’d love to hear how you integrate SuiteQL into your NetSuite processes! Share your insights and experiences in the NetSuite Admin Corner.