SharePoint / SharePoint/sp-dev-docs
How to provision a lookup column with enforce delete behavior as "Cascade" ?
@Ashlesha-MSFT is already working on this.
Since Mar 4, 2025.
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- SharePoint Framework version 1.19.0
Issue description
When I tried to re-use an existing lookup Site column in list schema and set RelationshipDeleteBehavior as "Cascade" it doesn't follow that settings.
The list is created together with the lookup column but the setting "Enforce relationship behavior" of that lookup column is still unchecked (and the value is also not "Cascade")
If I create a completely new lookup column inside the list scope then the value is set to "Cascade" but there is a new uncheck setting name "Enable relationships for this column" which prevents the "Enforce relationship behavior" to be checked.
Further investigation revealed that the "IsRelationship" value of the Field schema is what controls this "Enable relationships for this column" value. But this is automatically set to true when created as Site column, and default to false when created as List column.
What's more interesting is that the provisioning engine seems to ignore this "IsRelationship" value when it is set inside list column.
So does someone know if the current SPO supports provisioning lookup column with RelationshipDeleteBehavior as "Cascade" ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.