Creating a Parent-Child Relationship

The following process describes an example of creating a parent-child relationship using a custom field. For this example, we are going to create a custom field and assign the parent record and child record. The parent record pulls in the child record information through the custom field. We want to associate a list of customers to our case records, so we will create an entity custom field called Customer Records. The parent record in this example is Case, and the child record is Customer. This Customer field displays a list of customers associated with the case.

To create the parent-child relationship:

  1. Go to Customization > Lists, Records, & Fields [Custom Field] > New, where [Custom Field] is the required field type.

    The type of field you select depends on the type of record you want to associate.

  2. In the Label field, enter a name for your custom field. For this example, enter Customer Records.

  3. In the Type field, select List/Record or Multiple Select.

    To associate multiple records to another record, select Multiple Select. In our example, Multiple Select lets you associate multiple customer records to a case.

  4. In the List/Record field, select the parent record you want to associate this list (of customer records, in this case) with. For this example, select Case. Note that this field is available only if you selected a type of List/Record or Multiple Select.

  5. To make the Case record a parent of the Customer child record, check the Record is Parent box. With this box checked, a child sublist appears on the parent record. The Record is Parent box is available after you select a valid record type in the List/Record field.

  6. On the Applies To subtab, you specify the child record. Check the box beside the type of child record you want to associate with the parent record previously selected in the List/Record field. If applicable, you can check more than one record type. For this example, check Customer.

  7. Click the Display subtab.

  8. In the Parent Subtab field, select the subtab where you want this list to display on the parent record. Note that this field is available only when Record is Parent is checked.

  9. Click Save.

You will now have a parent record of Case with a subtab called Customers that lists all customers affected by this case.

Example parent-child relationship sublist
Note:

When associating a list with a transaction, you can select only transactions with forms that can be customized. For example, you can associate a list of cases with a cash sale but not to a bill.

The following transaction types are available as parents:

Watch the following video for an example of creating a parent-child relationship between a standard record and a custom record.

Watch the following video for an example of creating a parent-child relationship between custom records.

Triggering User Events

User events are triggered when a custom child record is associated with or separated from its parent record, unless the custom field referencing the parent record is of type Multiple Select. A beforeLoad, beforeSubmit, or afterSubmit event occurs if a record is associated or separated.

The user events support scripting and workflows based on association and separation of custom child records. The event is audited on the custom child record as an edit execution event type and is supported in SuiteScript 2.0. For more information about user events, see SuiteScript 2.x User Event Script Type.

Related Topics

General Notices