Custom Child Record Sublist IDs Overview

Unlike other sublists, there are no standard IDs that can be documented for custom child record sublists. The internal ID for the sublist itself, and all of its associated fields, is unique to each custom child record sublist.

See these topics for guidelines on determining which IDs to reference in N/record Module or N/currentRecord Module:

Determining the Sublist ID

The internal ID for a custom child record sublist is recmach + field_id_for_the_parent_field (for example: recmachcustrecord111).

Use Record.getSublistValue(options) or CurrentRecord.getSublistValue(options).

          // Add code.
...
var sublistFieldValue = objRecord.getSublistValue({ sublistId: 'item', fieldId: 'item', line: 3
});
...
// Add code. 

        

Finding the Internal ID of a Custom Child Record Sublist

The following steps describe where to look in NetSuite to get the internal ID of a custom child record sublist.

To get the internal ID of a custom child record sublist (the field ID for the parent record):

  1. Go to the record definition for the custom record type (see the following screenshot).

  2. On the Fields subtab, notice that the ID column lists a List/Record field type.

    The New Customer field (internal ID: custrecord111) is the parent field for the fixed assets records that appear as children on customer records. Therefore, the internal ID for the custom child Fixed Assets sublist on customer records is recmachcustrecord111.

    Sample Fixed Assets custom record type highlighting where to find the custom child internal ID.

Obtaining the Internal ID of the Parent Field

The following is an alternative approach for obtaining the internal ID of the parent field.

To obtain the internal ID of the parent field:

  1. On the custom child record sublist, click the New child record button (see the following screenshot for a general example).

    Sample customer record Fixed Assets subtab.
  2. When the new child record opens (see the following screenshot), notice the field that ties the child record to the parent record.

    In this case, the New Customer field shows that the customer record for Abe Simpson is the parent of the fixed assets record. The field level help popup window for New Customer lists the field's internal ID as custrecord111. Therefore, the internal ID for the Fixed Assets sublist appearing on the (parent) customer record is recmachcustrecord111.

    Sample Field Help highlighting the Field ID.
Note:

Internal IDs for custom child record sublists also appear in the SuiteScript Debugger when you load the record that includes the sublist.

Determining Field IDs

Use these steps to get internal field IDs on a custom child record sublist:

  1. Go to the custom record definition page (for example, go to Customization > Lists, Records, & Fields > Record Types and select your custom record in the Record Types list).

  2. On the Fields subtab of the Custom Record Type page (see the following screenshot), all field internal IDs appear in the ID column. These are the IDs you reference as the fieldId value in Record.getSublistValue(options) or CurrentRecord.getSublistValue(options).

    Sample Fixed Assest custom record type with ID fields highlighted on the Fields subtab.

    Example:

                    //Get the value of the Cost field on the first line (see the following figure) ...
    var sublistFieldValue = objRecord.getSublistValue({ sublistId: 'irecmachcustrecord111', fieldId: 'custrecord1', line: 1
    }); 
    
                  

    You can get or set values for fields that appear in the Fixed Assets sublist. You can also set or get values that exist on the record, but do not appear in the sublist UI.

    For example, the following line sets the value of the Salvage Value field in the fixed assets record 3 (see the following screenshot). The internal ID for Salvage Value is custrecord2. See this value on the Custom Record Type definition page for the fixed assets record type.

                    objRecord.setCurrentSublistValue({ sublistId: 'recmachcustrecord111', fieldId: 'custrecord2', }); 
    
                  
    Sample customer record highlighting a row on the Fixed Assets subtab.

Related Topics

Custom Child Record Sublist Creation with SuiteScript
Custom Child Record Sublists
Creating Custom Child Record Sublists
Scripting with Custom Child Record Sublists

General Notices