(Example) Configure a Relationship in Data Entities

This topic gives an example of how to create relationship between the primary field and a custom field in another entity.

Prerequisites

Good to Know

  • For the use case in this example, a business wants to associate a person with an account. The Account Name field in the built-in Account entity is associated with a custom Account Name field in the built-in Person entity. If the Account Name is changed in the Account entity, the Account Name field is updated in the Person entity.
  • In the Data tab, the field for which you create a relationship shows the Lookup Data icon next to the field.

Step 1: Create a Relationship

Create a relationship between entities.

How to Start

  1. Click Build Apps Build Apps.


  2. On the Application Explorer screen, click Data Entities.


  3. On the Home screen, click Entities .


  4. On the Entities screen, click the Person entity.


  5. On the Person entity, click the Relationship tab.


  6. On the Relationship tab, click Add Relationship .


Procedure

  1. On the New Relationship screen, in the Name field, enter PersonAccountName.


  2. In the Parent Entity field, select Account.


  3. In the Parent Primary Field select Account Name.


  4. In Child Field Display Name field, enter Account Name.


  5. In the Child Field Name field, enter AccountName.

    When you click Child Field Name field, this field completes the value from Child Field Display Name field.



  6. Click Save.


    The Relationship tab shows the relation name PersonAccountName_r.


Step 2 (Optional): Enter Data in the Parent Field to Update in the Child Field

Enter a record in the parent field in a relationship.

Good to Know

  • This step is not required to create the relationship. It shows how the relationship updates the data in the child field when data is entered in the parent field.

How to Start

  1. On the Entities screen, click the Account entity.


  2. On the Account entity, click the Data tab.


  3. On the Data tab, click Add Data


Procedure

  1. On the New Data screen, Account Name field, Enter Personal Bank Account.


  2. Click, Save


    The Data tab shows the data Personal Bank Account in the Account Name field.



  3. On the Home screen, click Entities .


  4. On the Entities screen, click the Person entity.


  5. On the Person entity, click the Data tab.


  6. On the Data tab, Click Add Data .


  7. On the Add Data screen, click Lookup Data .


  8. On Select a Record screen, click Personal Bank Account.

    The data you entered in Account entity fields is shown in this screen.



  9. Click Select.


  10. The Account Name field shows Personal Bank Account.


  11. Click Save.


    The Data tab shows the Personal Bank Account in Account Name field.