Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
Syndicated from - https://d365demystified.com/2019/07/19/solving-the-record-could-not-be-deleted-because-of-an-association-error-in-d365-ce/
Restricting Delete for child records is something customizers should start paying special attention towards defining 1:N relationships for entity records.
System Customizers often design this on purpose so that you are aware that the record you are deleting has child records associated with it and cannot be deleted.
Let’s consider this scenario – Account is a parent of Subscription (which is a custom entity)
Assume, Subscription 1 record has Account lookup to record A. Datum Corporation. When you attempt to Delete the Account, you get this error message.
And when you download the Log File from the button on the error message, you can see at the very bottom on the Log that Cascade Delete failed due to the restriction.
It also mentions what child entity is causing it
The reason being 1:N relationship on the Account entity to Subscription entity.
Now, since this is a Restriction on Delete, you can either change it if you are allowed to modify the behavior and it should be fine However, some system relationships can’t be changed. Example – Opportunity to Quote relationships
To overcome this, you can remove the Opportunity Lookup value on the Quote entity and save the record.
Then, the parent Opportunity can be deleted.
Hope this helps!
Business Applications communities