create_dataverse_relationship
Create relationships between Dataverse tables to establish data connections, enable navigation, and maintain referential integrity. Supports One-to-Many and Many-to-Many relationship types.
Instructions
Creates a relationship between two Dataverse tables. Supports One-to-Many relationships (parent-child with lookup field) and Many-to-Many relationships (junction table). Use this to establish data connections between tables, enable navigation, and maintain referential integrity.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
cascadeAssign | No | Cascade behavior for assign operations | NoCascade |
cascadeDelete | No | Cascade behavior for delete operations | RemoveLink |
cascadeMerge | No | Cascade behavior for merge operations | NoCascade |
cascadeReparent | No | Cascade behavior for reparent operations | NoCascade |
cascadeShare | No | Cascade behavior for share operations | NoCascade |
cascadeUnshare | No | Cascade behavior for unshare operations | NoCascade |
entity1LogicalName | No | First entity logical name for Many-to-Many relationships | |
entity2LogicalName | No | Second entity logical name for Many-to-Many relationships | |
intersectEntityName | No | Name for the intersect entity (auto-generated if not provided) | |
isHierarchical | No | Whether this is a hierarchical relationship (One-to-Many only) | |
isValidForAdvancedFind | No | Whether the relationship is valid for Advanced Find | |
menuBehavior | No | How the relationship appears in associated menus | UseCollectionName |
menuGroup | No | Menu group for the relationship | Details |
menuLabel | No | Custom label for the menu (required if menuBehavior is UseLabel) | |
menuOrder | No | Order in the menu | |
referencedEntity | No | Referenced (parent) entity logical name for One-to-Many relationships | |
referencingAttributeDisplayName | No | Display name for the lookup attribute | |
referencingAttributeLogicalName | No | Logical name for the lookup attribute to be created | |
referencingEntity | No | Referencing (child) entity logical name for One-to-Many relationships | |
relationshipType | Yes | Type of relationship to create | |
schemaName | Yes | Schema name for the relationship (e.g., 'new_account_contact') |
Input Schema (JSON Schema)
{
"properties": {
"cascadeAssign": {
"default": "NoCascade",
"description": "Cascade behavior for assign operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"cascadeDelete": {
"default": "RemoveLink",
"description": "Cascade behavior for delete operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"cascadeMerge": {
"default": "NoCascade",
"description": "Cascade behavior for merge operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"cascadeReparent": {
"default": "NoCascade",
"description": "Cascade behavior for reparent operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"cascadeShare": {
"default": "NoCascade",
"description": "Cascade behavior for share operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"cascadeUnshare": {
"default": "NoCascade",
"description": "Cascade behavior for unshare operations",
"enum": [
"NoCascade",
"Cascade",
"Active",
"UserOwned",
"RemoveLink",
"Restrict"
],
"type": "string"
},
"entity1LogicalName": {
"description": "First entity logical name for Many-to-Many relationships",
"type": "string"
},
"entity2LogicalName": {
"description": "Second entity logical name for Many-to-Many relationships",
"type": "string"
},
"intersectEntityName": {
"description": "Name for the intersect entity (auto-generated if not provided)",
"type": "string"
},
"isHierarchical": {
"default": false,
"description": "Whether this is a hierarchical relationship (One-to-Many only)",
"type": "boolean"
},
"isValidForAdvancedFind": {
"default": true,
"description": "Whether the relationship is valid for Advanced Find",
"type": "boolean"
},
"menuBehavior": {
"default": "UseCollectionName",
"description": "How the relationship appears in associated menus",
"enum": [
"UseCollectionName",
"UseLabel",
"DoNotDisplay"
],
"type": "string"
},
"menuGroup": {
"default": "Details",
"description": "Menu group for the relationship",
"enum": [
"Details",
"Sales",
"Service",
"Marketing"
],
"type": "string"
},
"menuLabel": {
"description": "Custom label for the menu (required if menuBehavior is UseLabel)",
"type": "string"
},
"menuOrder": {
"description": "Order in the menu",
"type": "number"
},
"referencedEntity": {
"description": "Referenced (parent) entity logical name for One-to-Many relationships",
"type": "string"
},
"referencingAttributeDisplayName": {
"description": "Display name for the lookup attribute",
"type": "string"
},
"referencingAttributeLogicalName": {
"description": "Logical name for the lookup attribute to be created",
"type": "string"
},
"referencingEntity": {
"description": "Referencing (child) entity logical name for One-to-Many relationships",
"type": "string"
},
"relationshipType": {
"description": "Type of relationship to create",
"enum": [
"OneToMany",
"ManyToMany"
],
"type": "string"
},
"schemaName": {
"description": "Schema name for the relationship (e.g., 'new_account_contact')",
"type": "string"
}
},
"required": [
"relationshipType",
"schemaName"
],
"type": "object"
}