Published at: 2025-10-30

Master-Detail Field


1. Use Cases for Primary–Sub Object Fields

Primary–sub-object relationships mean a Primary Object can have multiple Sub-objects while each Sub-object belongs to only one Primary Object. For example, Company A generates Sales Orders and corresponding order line items during sales. The Sales Order and its order line items have a Primary–Sub relationship: Sales Order is the Primary Object and order line items are the Sub-object. Using this relationship lets you view and manage the list of order line items tied to a Sales Order, improving data visibility, accuracy, and management efficiency so you can get a fuller picture of each order.

image 主从字段使用场景

2. Instructions

2.1 Configuring Primary–Sub Fields

In a one-to-many relationship between a main business object and its detail business object, add the Primary–Sub field on the detail (Sub-object).

2.1.1 Primary Business Object

When you select a Primary Business Object, the object on the other side becomes the Sub-object. For example, if you set the Primary Business Object for order line items to be Sales Order, then Sales Order is the Primary Object and order line items are the Sub-object.

If you set the Related List Title for the Primary–Sub field on the order line item to “Sales Item”, then on the Sales Order detail page the related list for order line items will display the title “Sales Item”.

2.1.3 Cascading Actions and Data Permissions

  • Primary and Sub-object data states stay fully synchronized: when you void/restore/delete a Primary Object, the system voids/restores/deletes its Sub-objects accordingly.
  • edits to Sub-objects appear in the Primary Object’s change history.
  • Sub-object data permissions follow the Primary Business Object’s permissions.

image

image Primary–Sub cascading actions and data permissions

2.1.4 Require Sub-object on Primary Object Creation?

  • If set to “Yes”, users must add Sub-object details when creating a new Primary Object.
  • Example: If the order line item’s Primary–Sub field requires line items under Sales Order, then attempting to submit a new Sales Order without any order line items will block submission with the message “Sales Order cannot be empty”.

2.1.5 Show Separate Create/Edit Entry for This Sub-object?

  • This setting is fixed and not editable.
  • Allowing separate editing breaks the standard Primary–Sub relationship: separate edits cannot keep Primary and Sub-object data state and permissions synchronized. If you need independent create/edit behavior, use a Lookup relationship instead.

image Difference between standard Primary–Sub relationship and Lookup relationship

2.2 Notes and Limitations for Primary–Sub Fields

  • Sub-objects (created together with the Primary) cannot have independent approval workflows. Any Sub-object change triggers the Primary Object’s approval; the approval flow can display changes from both Primary & Sub.
  • Sub-objects cannot have independent mapping rules; mappings can apply to Primary and Sub together.
  • When creating/editing Primary–Sub records, you can define a custom sort order for Sub-objects, and list pages will display Sub-objects using that order.
  • You cannot add a lookup on a Sub-object to reference its Primary Object; within one object, a Primary–Sub field and a Lookup field cannot reference the same target object.
  • Custom Sub-objects no longer support a standalone create entry. Related configuration options for the Primary–Sub field are forced to read-only and cannot be changed.
  • Primary–Sub relationships cannot be nested (no multi-level chains). For example, if order line items are a Sub-object of Sales Order, you cannot set Sales Order as a Sub-object of another object.
  • A Primary Object can have up to five Sub-objects. Each object supports only one Primary–Sub field.
  • Some default system objects historically support independent Sub-object creation/editing.
  • Sub-objects generally do not support standalone create/edit; the field property “Show separate create/edit entry for this Sub-object” is not editable. When you need two objects to support separate create/edit, consider whether a Lookup relationship can satisfy the business need—Lookup components allow standalone creation.

    Note: 1. This feature currently does not support the following objects (these objects do support a sort field): Products, Product, Specification, Specification Value, Price List Item, Unit; 2. Mobile client does not support ordering; mobile displays the order defined on Web; 3. Template printing also follows the defined sort order; 4. Default Sub-object count is 200 rows. To increase the Sub-object limit you can purchase Sub-object row resource packs. Each pack adds 100 Sub-object rows; you can buy up to 3 packs.

Submit Feedback