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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Prevent deletion of 1:n associated record

(0) ShareShare
ReportReport
Posted on by 55

In Dynamics CRM it is not possible to delete e.g. an QuoteDetail as soon as the status of the owning Quote is active or closed (you can try to delete the QuoteDetail, but you get an error message). I think this behavior does make sense.

How is it implemented in Dynamics CRM? I would like to get the same behavior for custom entities linked with an 1:n association.

Thank you!

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    Unfortunately you can't use OOB functionality to prevent deletion based on status. You need to write a plugin.

    Please refer to this Post to understand what is the message to use:

    community.dynamics.com/.../ms-dynamics-crm-associate-disassociate-message-plugin

    The plugin must execute in pre-validation. Basically, the plugin will raise an exception to stop the process.

  • gupta.ambar2009@gmail.com Profile Picture
    797 on at

    Hello ,

    Check configurable cascading behavior in relationship to restrict deletion of record .

  • krombi Profile Picture
    55 on at

    I think this won't help. With the cascading behavior I can only prevent deletion of the 1-side of the association as long as related entities exist.

  • meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    Unfortunately you can't handle this scenario with OOB functionality, please check my first post.

  • krombi Profile Picture
    55 on at

    Thank you, I'll look at the plugin solution.
    In the meantime I found a solution using real-time workflows. Seems to be working fine. But I don't know which solution I prefer. Do you have an opionion? (I'm totally new to Dynamics/CDS...)

  • meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    can you please your real-time workflow ?

  • krombi Profile Picture
    55 on at

    Ah, damn. I forgot the add a link to workflow solution... Here it is: Prevent delete with workflows

  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Good job !! Yes go for the workflow, I forgot about that option !!

  • krombi Profile Picture
    55 on at

    Thank you!

    Hopefully Microsoft will add a more 'natural' solution at some point...

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans