Relationships
Relationship steps manage the connections between Dataverse records - associating and disassociating related entities.
All four relationship steps share a common set of parameters. Entity Logical Name / Entity ID identify the primary record, Other Entity Logical Name identifies the related entity type, and Relationship Schema Name is the relationship to act on. For many-to-many relationships, Entity Role (Entity1, Entity2, or Any) disambiguates which side of a self-referential relationship the primary record plays.
Associate Relationship
Links a related record (or reference) to a primary record via a relationship.
| Parameter | Description |
|---|---|
| Entity Logical Name | The primary entity type |
| Entity ID | The primary record ID |
| Other Entity Logical Name | The related entity type to associate |
| Relationship Schema Name | The relationship schema name |
| Entity | The related record/reference to associate |
| Entity Role | (Many-to-many) the role of the primary record: Entity1, Entity2, or Any |
Example:
ASSOCIATE RELATIONSHIP
Entity Logical Name: account
Entity ID: Customer.Id
Relationship Schema Name: account_contacts
Other Entity Logical Name: contact
Entity: NewContact
Associate Multiple Relationships
Links multiple records to a single record in one operation.
| Parameter | Description |
|---|---|
| Entity Logical Name | The primary entity type |
| Entity ID | The primary record ID |
| Other Entity Logical Name | The related entity type to associate |
| Relationship Schema Name | The relationship schema name |
| Entities | Collection of related records/references to associate |
| Entity Role | (Many-to-many) the role of the primary record: Entity1, Entity2, or Any |
This step is more efficient than calling Associate Relationship multiple times in a loop.
Example:
ASSOCIATE MULTIPLE RELATIONSHIPS
Entity Logical Name: team
Entity ID: SalesTeam.Id
Relationship Schema Name: teammembership_association
Other Entity Logical Name: systemuser
Entities: NewTeamMembers
Disassociate Relationship
Removes the link between two records.
| Parameter | Description |
|---|---|
| Entity Logical Name | The primary entity type |
| Entity ID | The primary record ID |
| Other Entity Logical Name | The related entity type to disassociate |
| Relationship Schema Name | The relationship schema name |
| Entity | The related record/reference to disassociate |
| Entity Role | (Many-to-many) the role of the primary record: Entity1, Entity2, or Any |
Example:
DISASSOCIATE RELATIONSHIP
Entity Logical Name: account
Entity ID: Customer.Id
Relationship Schema Name: account_contacts
Other Entity Logical Name: contact
Entity: FormerContact
Disassociate Multiple Relationships
Removes links between multiple records and a single record in one operation.
| Parameter | Description |
|---|---|
| Entity Logical Name | The primary entity type |
| Entity ID | The primary record ID |
| Other Entity Logical Name | The related entity type to disassociate |
| Relationship Schema Name | The relationship schema name |
| Entities | Collection of related records/references to disassociate |
| Entity Role | (Many-to-many) the role of the primary record: Entity1, Entity2, or Any |
Example:
DISASSOCIATE MULTIPLE RELATIONSHIPS
Entity Logical Name: campaign
Entity ID: Campaign.Id
Relationship Schema Name: campaignitem_association
Other Entity Logical Name: product
Entities: RemovedProducts
Get Entities by Relationship
Retrieves the records related to a given record via a specific relationship. The Relationship Type determines which set of parameters applies: OneToMany or ManyToMany.
One-to-Many (OneToMany) parameters:
| Parameter | Description |
|---|---|
| Relationship Type | OneToMany |
| Relationship Schema Name | The relationship schema name |
| Referenced Entity | The "one" side entity type (holds the primary record) |
| Referenced Entity ID | The primary record ID on the referenced side |
| Referencing Entity | The "many" side entity type to retrieve |
| Referencing Entity Properties | The columns to return on each retrieved record |
Many-to-Many (ManyToMany) parameters:
| Parameter | Description |
|---|---|
| Relationship Type | ManyToMany |
| Relationship Schema Name | The intersect relationship schema name |
| Entity | The primary entity type |
| Entity ID | The primary record ID |
| Other Entity | The related entity type to retrieve |
| Other Entity Properties | The columns to return on each retrieved record |
| Entity Role | The role of the primary record: Entity1, Entity2, or Any |
Returns: A collection of related records.
Example - One-to-Many:
GET ENTITIES BY RELATIONSHIP
Relationship Type: OneToMany
Relationship Schema Name: account_contacts
Referenced Entity: account
Referenced Entity ID: Customer.Id
Referencing Entity: contact
Referencing Entity Properties: [ firstname, lastname, emailaddress1 ]
→ Store in variable: CustomerContacts
Example - Many-to-Many:
GET ENTITIES BY RELATIONSHIP
Relationship Type: ManyToMany
Relationship Schema Name: teammembership_association
Entity: team
Entity ID: SalesTeam.Id
Other Entity: systemuser
Other Entity Properties: [ fullname ]
Entity Role: Any
→ Store in variable: TeamMembers
Best Practices
Use Correct Relationship Names: Always use the exact relationship schema name from Dataverse. You can find this in the entity customization area.
Batch When Possible: Use Associate Multiple / Disassociate Multiple when working with several records to improve performance.
Check Existing Relationships: Before associating, consider whether the relationship already exists to avoid duplicate relationship errors.
Handle Many-to-Many Carefully: Many-to-many relationships require using the intersect entity relationship name.