SharePoint / SharePoint/sp-dev-docs

How to provision a lookup column with enforce delete behavior as "Cascade" ?

Open
#10,137 6 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Mar 4, 2025.

Needs: Triage :mag: sharepoint-developer-support type:bug-confirmed
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")

Image

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.

Image

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.

Image

So does someone know if the current SPO supports provisioning lookup column with RelationshipDeleteBehavior as "Cascade" ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.