Purpose of this query
This SuiteQL statement extracts a searchable inventory of custom fields from the CustomField table, returning each field’s display name, field type, value type, owner (human readable), script id, and last modified timestamp. Use it to audit customizations, find recently changed fields, identify owners for remediation, or prepare environment comparisons between sandbox and production.
SuiteQL
SELECT
name,
fieldtype,
fieldvaluetype,
BUILTIN.DF( owner ) AS owner,
scriptid,
lastmodifieddate
FROM
CustomField
ORDER BY
scriptid;
Sample Output
How the query works
Selecting core metadata columns
The query reads name, fieldtype, fieldvaluetype, scriptid, and lastmodifieddate directly from the CustomField table to give a concise summary of each custom field.
Resolving the owner to a human-readable value
BUILTIN.DF(owner) converts the owner internal id into a display-friendly name or identifier so you can contact the owner directly.
Ordering for stability and comparison
ORDER BY scriptid provides a stable, predictable sort useful for diffs across environments and for importing into Excel for side-by-side comparisons.
Why this is useful
• Customization audits: quickly identify which fields exist and what type they are (e.g., list, checkbox, text).
• Ownership and remediation: find who last modified or owns a field to coordinate cleanups or deprecation.
• Environment comparison: export scriptid-sorted lists from sandbox and production to detect unintended changes.
• Impact analysis: combine with usage queries to see which custom fields are actually populated or referenced.
• Upgrade readiness: identify rarely used or legacy fields before major NetSuite updates.
Notes for customization
• Filter by lastmodifieddate to show recent changes only: add WHERE lastmodifieddate >= TO_DATE(‘2025-01-01’,‘YYYY-MM-DD’).
• Scope by owner or role: add WHERE owner = <internal_id> or use BUILTIN.DF(owner) in a HAVING clause after grouping.
• Include internal ids: if you need the internal field id, select internalid or id if available in your schema.
• Join to other tables: join to customrecord metadata or field usage tables if you want to see where fields are used on records or forms.
• Environment comparison tip: export results as CSV and compare sorted by scriptid to detect differences between accounts.

