Skip to main content

ppds_metadata_create_relationship

Creates a relationship (one-to-many or many-to-many) between two Dataverse tables. For one-to-many, a lookup column is created on the referencing entity. Supports dry-run mode.

Input schema

NameTypeRequiredDescription
solutionStringyesUnique name of the solution to add the relationship to.
referencedEntityStringyesLogical name of the referenced (parent / 'one' side) entity.
referencingEntityStringyesLogical name of the referencing (child / 'many' side) entity.
schemaNameStringyesSchema name for the relationship.
relationshipTypeStringyesRelationship type: 'oneToMany' or 'manyToMany'.
lookupSchemaNameStringnoSchema name of the lookup column on the referencing entity (required for oneToMany, ignored for manyToMany).
lookupDisplayNameStringnoDisplay name of the lookup column (required for oneToMany, ignored for manyToMany).
dryRunBooleannoIf true, validates without persisting changes.

Output

Returns Task<MetadataCreateRelationshipResult>.