web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

System Relationships Not Marked as Modified in Solution — Inconsistent Behavior Across Tables

(4) ShareShare
ReportReport
Posted on by 17

Hello everyone,

I’m running into an issue with relationship metadata not being included in a solution export — and it seems to affect some but not all system relationships.

 

🔍 Context

I have an unmanaged solution in my Dev environment that includes the following 1:N relationships from the Email table:


  • Account_Emailsincluded and marked as modified in the solution export

  • Contact_Emailsincluded and working as expected

  • Incident_Emailspresent but marked unmodified="1"

  • Lead_Emailspresent but not treated as modified

  • Opportunity_Emailssame issue as above


 

✅ What I’ve Done


  • I added the Account, Contact, Incident, Lead,  Opportunity tables to the solution with “Include table metadata” checked.

  • I modified Cascade Assign on all five relationships (e.g., set to “Cascade None”).

  • I exported the solution (unmanaged and managed) and checked the customizations.xml.


 

🔎 Observations


  • Account_Emails and Contact_Emails are NOT marked as unmodified="1" — and their cascade behavior changes are successfully deployed to other environments using managed solution.

  • Incident_Emails, Lead_Emails, and Opportunity_Emails are present in the XML of the unmanaged solution, but always marked as unmodified="1" and not exported to managed solution.


 

❓ What I'm Trying to Understand


  • Why are only some of these relationships treated as solution-aware components, while others (like Incident_Emails) are ignored by the solution system? I suspect that this is connect with the value of IsManaged property.

  • Is this expected behavior for system relationships involving Case, Lead, and Opportunity?

  • What is the supported approach to deploy relationship-level metadata (like cascade behaviour) for these system relationships?


 

📎 I’ll attach:


  • Screenshots from Maker Portal showing the metadata (Managed, Customized, Customizable)

  • Sample unmanaged solution


 

Thanks in advance for any insight, confirmation, or workaround suggestions.

Happy to test anything further if needed.

 

Best regards,

Leszek

I have the same question (0)
  • Verified answer
    LR-09071359-0 Profile Picture
    17 on at
    System Relationships Not Marked as Modified in Solution — Inconsistent Behavior Across Tables

    Hi Everyone,

    I’d like to share a summary of what I’ve found after working with Microsoft support and doing some investigation:

     

    Confirmed Behavior:

    Some out-of-the-box relationships — such as Incident_Emails, Lead_Emails, and Opportunity_Emails — are part of the Basic solution layer in Dataverse. These relationships are not exportable or customizable through solutions, even if you modify their cascade behavior in an unmanaged environment.

     

    ⚠️ Why This Happens:


    • Basic-layer relationships are created by the platform and intended to be modified only at runtime or manually.

    • They are marked as unmodified="1" in customizations.xml, even after UI-based changes.

    • Conversely, other relationships like Account_Emails and Contact_Emails belong to the System layer and do support exporting when modified.

    Incident_Emails:

    Account_Emails:

     

    🔄 Workaround:

    To deploy changes to Basic-layer relationships (e.g., changing CascadeAssign to None), you must:


    • Apply changes manually in each target environment, or

    • Use a C# or PowerShell script leveraging the Dataverse SDK to update relationship metadata via the API after deployment.


    •  

    📎 Example of C# solution using ServiceClient:

     
    var retrieveRequest = new RetrieveRelationshipRequest { Name = "Incident_Emails" };
    // modify metadata...
    var updateRequest = new UpdateRelationshipRequest { Relationship = modifiedMetadata };
    service.Execute(updateRequest);
     

    This limitation is not documented explicitly in public Microsoft docs (yet), but it has been confirmed by Microsoft support and we’ve reproduced it across multiple environments.

    I hope this helps others facing the same issue — happy to share the full script if anyone is interested.

  • Suggested answer
    Holly Huffman Profile Picture
    6,522 Super User 2025 Season 2 on at
    System Relationships Not Marked as Modified in Solution — Inconsistent Behavior Across Tables
    Good morning, afternoon, or evening depending on your location :)
    Hope you are well today!
     
    Thanks for sharing the document. You've described a nuanced and well-documented issue involving system relationships in Dataverse not being marked as modified in solution exports, specifically for relationships like Incident_Emails, Lead_Emails, and Opportunity_Emails.
     
    Summary of the Issue
    • You modified cascade behaviors (e.g., CascadeAssign = NoCascade) for several 1:N system relationships from the Email table.
    • Some relationships (e.g., Account_Emails, Contact_Emails) are correctly marked as modified and exported.
    • Others (e.g., Incident_Emails, Lead_Emails, Opportunity_Emails) are present in the unmanaged solution but marked with unmodified="1" and not included in the managed solution export.
    • You suspect this is related to solution awareness or managed component behavior.
     
    Key Observations from Your XML
    • The affected relationships (Incident_Emails, Lead_Emails, Opportunity_Emails) are marked with unmodified="1" in the <EntityRelationship> nodes.
    • These relationships are system-defined and part of Microsoft-managed solutions like:
      • msdynce_Service
      • msdynce_LeadManagement
      • msdynce_Sales
    • The entities themselves (incident, lead, opportunity) are also marked as unmodified="1" in the <Entity> nodes.
     
    Root Cause
    This is expected behavior for system relationships that are part of managed solutions. Here's why:
    1. System relationships are not always solution-aware unless explicitly customized.
    2. Even if you change metadata like cascade behavior, the platform may not treat it as a "customization" unless:
      • The relationship is customizable.
      • The change is persisted in a way that flags it as modified.
    3. The unmodified="1" flag means the component is referenced but not customized in your solution.
    Supported Workarounds
    Option 1: Use the Classic Solution Designer
    • Open the solution in the classic UI (Advanced Settings > Customizations).
    • Navigate to the relationship (e.g., Incident_Emails) and make a minor change (e.g., toggle cascade, save, toggle back).
    • This often forces the system to mark the relationship as modified.
    Option 2: Use the XrmToolBox Plugin
    • Use the “Solution Components Mover” or “Metadata Document Generator” to inspect and force inclusion of relationships.
    • Some plugins allow you to manually flag components as modified.
    Option 3: Use a Patch Solution
    • Create a patch solution from your base solution.
    • Add only the affected relationships and re-export.
    • This sometimes bypasses the unmodified="1" behavior.
    Option 4: Use the SDK or PowerShell
    • Use the Dataverse SDK or Power Platform Tools for PowerShell to programmatically update the relationship metadata.
    • Example: Use Set-CrmEntityRelationship to update cascade settings and force a customization.
    Answers to Your Questions
    Question Answer
    Why are only some relationships treated as modified? Because only those that are customized and customizable are flagged as modified. Others remain unmodified="1" unless explicitly changed.
    Is this expected for Case, Lead, Opportunity? Yes. These are part of Microsoft-managed solutions, and their relationships are often locked unless explicitly overridden.
    How to deploy cascade behavior changes? Use the classic UI, patch solutions, or PowerShell/SDK to force the system to treat them as modified.
    Can I confirm which solution owns the relationship? Yes. Your XML shows dependencies on msdynce_Service, msdynce_LeadManagement, and msdynce_Sales. These are the source solutions.
     
    Note: I collaborated with Copilot to help craft this response for clarity and completeness.
    Hope this helps some!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 394

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 106 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans