Custom Child Record Sublists

When working with custom child record sublists you can use all the N/record Module or N/currentRecord Module provided in SuiteScript. If you are not familiar with custom child record sublists, you should read these topics in order:

Custom Child Record Sublists Overview

Custom child record sublists are Inline Editor Sublists that contain a list of custom records.

You can do the following tasks with Inline Editor Sublists:

The following screenshot shows a custom child record sublist of fixed assets records. These records appear as line items on a custom Fixed Assets subtab. The parent record that contains the sublist of custom fixed assets records is the customer record.

In the UI, click New Fixed Assets to create a new fixed assets child record. The new record is added to the Fixed Assets sublist and is scriptable. In SuiteScript, add a new fixed assets child record by adding a new line to the sublist.

Example of adding a new fixed assets child record to a sublist.

When the New Fixed Assets button is clicked, a new fixed assets record opens (see the following screenshot). Note that the fixed assets record contains a New Customer field. This field is a List/Record field that references the parent record – in this case, the Abe Simpson customer record.

Note:

The parent–child relationship between the fixed assets record type and the customer record type was defined on the Custom Record Type definition page for the fixed assets record. (For general information about creating parent–child relationships between records, see Parent-Child Record Relationships.)

The Fixed Assets fields that appears in the sublist are the required fields (those body fields that appear with the asterisk on the fixed assets record) and those fields that have been set to Show in List in the Custom Field definition page for the fixed assets record type. You can use N/record Module or N/currentRecord Module to set or get values for all fixed assets fields in a Fixed Assets sublist.

Sample Fixed Assets page with mandatory fields highlighted.

The New Customer field is a List/Record field that references the parent record of the fixed assets (child) record.

If you know the internal ID of a fixed assets field, you can update the field through sublist scripting. (See Custom Child Record Sublist IDs Overview to learn how to get field IDs for all fields on a custom child record sublist.)

Sample Customer page with Fixed Assets subtab highlighted.

Fields set to Show in List on the fixed assets record type appear in the sublist. However, you can update any fixed assets field through scripting.

When a transaction is created by transformation from another record type, custom child record sublists are available for editing on the new transaction. Sublists are also available when users select the Make Copy action on an original transaction. The sublists are empty to prevent problems when copying child records, so the user should enter new sublist values.

Related Topics

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

General Notices