Skip to content

Define Entity Relationships

Key Lesson: In this step, you learn how to define relationships between header and detail entities so each record can access its related data.

With the transactional entities in place, configure the three relationship pairs required by the Purchasing app:

  1. PurchaseRequest ↔ PurchaseRequestItem
  2. Quotation ↔ QuotationItem
  3. PurchaseRequest ↔ Quotation

The following diagram shows the relationship direction and cardinality between the Purchasing entities.



Figure 1:

This ERD illustrates how the transactional entities relate to one another and how they reference the shared Currency and CostCenter static entities across both header–detail structures.

Configure the many-to-one relationship first, then add the corresponding one-to-many relationship and select the first relationship as its inverse.

1. PurchaseRequest ↔ PurchaseRequestItem Relationship

Section titled “1. PurchaseRequest ↔ PurchaseRequestItem Relationship”
  1. Open the PurchaseRequestItem Entity Editor.
  2. Navigate to ENTITY RELATIONSHIPS and click +.
  3. Add the following relationship:
SettingValue
NAMErequest
TARGET ENTITYPurchasing.PurchaseRequest
RELATION TYPEmany-to-one: Many instances of this Entity have a relationship to a single instance of the target Entity (e.g. Address → Person)
  1. Leave all other properties at their default values.

  2. Save and close the editor.

  3. Next, open the PurchaseRequest Entity Editor.

  4. In ENTITY RELATIONSHIPS, click + and add:

SettingValue
NAMEitems
TARGET ENTITYPurchasing.PurchaseRequestItem
RELATION TYPEone-to-many: One instance of this Entity has a relationship to multiple instances of the target Entity (e.g., Person → Address)
  1. Leave all other properties at their default values.

Tip

If the INVERSE RELATIONSHIP dropdown is empty, press F5 to refresh the Entity Editor, then check the dropdown again.

  1. Save and close the editor.

2. Quotation ↔ QuotationItem Relationship

Section titled “2. Quotation ↔ QuotationItem Relationship”
  1. Open the QuotationItem Entity Editor.
  2. Add a new relationship:
SettingValue
NAMEquotation
TARGET ENTITYPurchasing.Quotation
RELATION TYPEmany-to-one: Many instances of this Entity have a relationship to a single instance of the target Entity (e.g. Address → Person)
  1. Leave all other properties at their default values.

  2. Save and close the editor.

  3. Next, open the Quotation Entity Editor.

  4. Add a new relationship:

SettingValue
NAMEitems
TARGET ENTITYPurchasing.QuotationItem
RELATION TYPEone-to-many: One instance of this Entity has a relationship to multiple instances of the target Entity (e.g., Person → Address)
  1. Leave all other properties at their default values.

  2. Save your changes before continuing.

3. Quotation ↔ PurchaseRequest Relationship

Section titled “3. Quotation ↔ PurchaseRequest Relationship”
  1. Keep the Quotation Entity Editor open.
  2. In ENTITY RELATIONSHIPS, click + and add:
SettingValue
NAMEpurchaseRequest
TARGET ENTITYPurchasing.PurchaseRequest
RELATION TYPEmany-to-one: Many instances of this Entity have a relationship to a single instance of the target Entity (e.g. Address → Person)
  1. Leave all other properties at their default values.

  2. Save and close the editor.

  3. Next, open the PurchaseRequest Entity Editor.

  4. In ENTITY RELATIONSHIPS, click + and add:

SettingValue
NAMEquotations
TARGET ENTITYPurchasing.Quotation
RELATION TYPEone-to-many: One instance of this Entity has a relationship to multiple instances of the target Entity (e.g., Person → Address)
  1. Leave all other properties at their default values.

  2. Save and close the editor.

Understand relationship direction, cardinality, inverse relationships, and how related entities are accessed.

Learn how to configure transactional entities in the Entity Editor.