Writing / Netsuite

CustomRecordCustomField SuiteQL Column Reference

A practical column checklist for SuiteQL against CustomRecordCustomField: which analytical fields to confirm in the Records Catalog and how to select them safely.

Once CustomRecordCustomField appears in your Records Catalog, the next question is which columns to select.

This is a column-oriented companion to How to Query NetSuite Custom Record Fields With SuiteQL. It does not restate the discovery workflow. It focuses on what each commonly useful analytical field represents and how to add columns without inventing identifiers.

Confirm the record first

Open Setup → Records Catalog, choose the SuiteScript and REST Query API channel, and search for CustomRecordCustomField. Oracle documents that this channel lists the fields and joins available to SuiteQL and constructed N/query queries in the current role’s context.

The catalog is account-, feature-, role- and channel-specific. If the record is absent, unavailable or named differently under the current role, stop and resolve availability before composing a column list. See Why CustomRecordCustomField Is Missing From SuiteQL for diagnosis steps.

Start with identity columns

Begin with the smallest stable set. Exact script IDs must come from your catalog; the names below are illustrative of intent only.

Purpose Illustrative analytical field What it usually means
Primary key id Internal ID of the field definition row
Script ID scriptid The custrecord_... identifier used in SuiteScript and forms
Display label label UI label for the field definition
SELECT
    field_definition.id,
    field_definition.scriptid,
    field_definition.label
FROM
    CustomRecordCustomField field_definition
ORDER BY
    field_definition.scriptid

If your catalog exposes a different name field instead of label, use that documented ID. Do not guess aliases from UI wording.

Owning custom-record type

Metadata rows describe field definitions, not values stored on instances. To scope definitions to one custom-record type, confirm the owning-type relationship in the catalog.

Common shapes (illustrative only):

  • A direct field such as recordtype holding the type’s internal ID
  • A documented join from CustomRecordCustomField to a custom-record type metadata record
SELECT
    field_definition.id,
    field_definition.scriptid,
    field_definition.label,
    field_definition.recordtype
FROM
    CustomRecordCustomField field_definition
WHERE
    field_definition.recordtype = ?
ORDER BY
    field_definition.scriptid

Pass the type internal ID as a bind parameter. Join patterns and alternate field IDs are covered in How to Join CustomRecordCustomField to CustomRecordType.

Field type and list or record target

For SELECT/list fields you often need the field type and the list or record the field points at.

Search the catalog for fields whose purpose matches:

  • Field type or datatype
  • Select list / record type target
  • Source list or related source attributes, if present

Illustrative selection only—replace every column with catalog IDs:

SELECT
    field_definition.id,
    field_definition.scriptid,
    field_definition.label,
    field_definition.fieldtype,
    field_definition.selectrecordtype
FROM
    CustomRecordCustomField field_definition
WHERE
    field_definition.recordtype = ?
ORDER BY
    field_definition.scriptid

Resolving selectrecordtype-style values into readable list or record names is a separate problem: How to Find a Custom Field’s List or Record Type With SuiteQL.

Flags that are useful in a data dictionary

When present in the catalog, these definition attributes help documentation and audits. Labels are illustrative; copy exact IDs from your account:

Purpose Typical meaning on a definition row
Mandatory Whether the definition requires a value
Store value Whether the field stores a value on the record
Show in list Whether the field is configured to appear in lists
Inactive / available Whether the definition is active for use
Display type How the field is presented on forms

Add one flag at a time after the base query succeeds. A missing column is usually an unavailable analytical field, not a SQL syntax problem—use Show Unavailable Items in the catalog and the steps in How to Find SuiteQL Table and Field Names.

Columns this reference does not invent

Do not assume that every SDF XML element or SuiteScript record field has a same-named SuiteQL column. SuiteQL uses the analytics schema, which differs from:

  • SuiteCloud / SDF object XML (customrecordcustomfield elements)
  • SuiteScript record module field IDs
  • Saved Search join and column names

For the XML side of field definitions, use SuiteCloud: Import a Custom Record and Its Custom Fields and SuiteQL Metadata vs SuiteCloud XML for Custom Records.

Metadata versus instance data

Selecting from CustomRecordCustomField returns definition rows. It does not return the values users entered on customrecord_... instances.

Question Query target
What fields exist on this type? Metadata record (for example CustomRecordCustomField if available)
What values are stored? The custom-record table (customrecord_...) and custrecord_... columns

Practical selection checklist

  1. Confirm CustomRecordCustomField (or the catalog’s equivalent) under the execution role and channel.
  2. Copy script IDs for identity columns only.
  3. Run a three-column query and verify results.
  4. Add owning-type filter or join from the catalog.
  5. Add type and select-target columns only if listed.
  6. Add flags one at a time.
  7. Keep illustrative names out of production scripts—store the verified IDs next to the query.

The Records Catalog remains the source of truth. This reference is a map of useful intents, not a universal schema dump for every NetSuite account.