Body Field Subrecords and Sublist Subrecords

When a subrecord occurs on a record, it is always represented by a single field on the record. In the SuiteScript Records Browser, this field is always listed as a field of type summary.

A field with a subrecord can be either a body field or a sublist field. For example, the subsidiary record has a body field called mainaddress, which stores an address subrecord. By contrast, the employee record permits the creation of multiple addresses, and each address is described in a sublist line. The sublist includes a field with the address subrecord.

Where the summary field is placed affects how you create the subrecord.

For an example of each type of placement, see the following sections:

Subrecord that Occurs in a Sublist Field Example

Many subrecord types can occur in a sublist field.

For instance, a purchase order's item sublist might have an Inventory Detail column, depending on your account settings. If the item on the line is a serialized or lot-numbered item, you can create a subrecord instance in this column.

In the UI, click the icon in the Inventory Detail column to view and edit the subrecord. This opens a new window showing the subrecord.

Subrecord displayed from Inventory Detail icon.

Note that other fields on the sublist line aren't part of the subrecord. For example, in the preceding screenshot, the values in the Item, Vendor Name, Received, Billed, and Quantity columns are not part of the subrecord.

For details on using SuiteScript 2.x to work with subrecords that exist on sublist lines, see Scripting Subrecords that Occur on Sublist Lines.

Subrecord that Occurs in a Body Field Example

A subrecord can also occur in a body field. The same subrecord type can be a sublist field on one record type and a body field on another.

For example, depending on the configuration of your account, the assembly build record can include an Inventory Detail body field. If the assembled item is serialized or lot-numbered, you can create an Inventory Detail subrecord in that field.

In the UI, click the icon under the Inventory Detail label to view and edit the subrecord in a new window.

Subrecord displayed from Inventory Detail icon in the body field.

For details on using SuiteScript 2.x to work with subrecords that exist in body fields, see Scripting Subrecords that Occur in Body Fields.

Related Topics

General Notices