Skip to main content

Create a Relationship Between Entities

Goal​

Create a One-to-Many relationship between two entities — for example, one account has many invoices.

The short version: add a lookup field​

A lookup is a relationship. You create a One-to-Many relationship simply by adding a lookup field to the "many" entity that points at the "one" entity — the platform creates the matching relationship automatically, in the same step. There is no separate "create relationship" action to perform.

Prerequisites​

  • You are signed in with a maker (or platform administrator) role.
  • Both entities exist in the environment (the referenced "one" entity and the referencing "many" entity).

Steps​

  1. Open Tables, choose the environment, and select the referencing ("many") entity — for example, Invoice — to open it on the Fields tab.
  2. Add a Lookup field (see Add a Field to an Entity) and choose the referenced ("one") entity — for example, Account — as its target.
  3. Select Add field. The lookup field is created and its One-to-Many relationship is created with it.
  4. Open Relationships to confirm the new relationship is listed. Its name is generated automatically from the entity and field (for example, par_invoice_par_account).

What happens behind the scenes​

A relationship is metadata describing how two entities relate; it is defined over the lookup field, so no new column is created for the relationship itself. Creating the lookup field creates the relationship in the same operation, and deleting the lookup field removes the relationship — the two always travel together. The lookup field is a real reference (foreign key) to the referenced entity's data table from the moment it is added.

Troubleshooting​

  • The relationship did not appear. — confirm you added a Lookup field (not another type) and chose a target entity; the relationship is created only for a lookup.
  • "The lookup target entity … was not found." — create the target ("one") entity first, then add the lookup on the referencing ("many") entity.
  • I want a specific relationship name. — relationship names are generated by the platform from the entity and field names and are not typed by hand, the same way option-set values are allocated for you.