Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

I need to delete an account record, but prevent deletion if any of the child contacts is in the active state. How can i do that?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I need to delete an account record, but prevent deletion if any of the child contacts is in the active state. How can i do that?

*This post is locked for comments

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,050 on at
    RE: I need to delete an account record, but prevent deletion if any of the child contacts is in the active state. How can i do that?

    Hi Santosh,

    Normally you should be able to do this by just configuring relationship like Gautam suggested but I assume you are using contact_customer_accounts out of the box relationship between Account and Contact. If so, you wont be able to configure the Delete behaviour, please see below

    ScreenClip-_5B00_262_5D00_.png

    You could create a Custom Workflow Activity (CWA) to check if Account has Active Contacts, and use that in a Real-Time workflow to prevent the record being deleted.

    In your real-time workflow, if the CWA returns false, you can use Stop Workflow step with Cancelled state and display the message saying account cannot be deleted because it has active contacts.

    Hope this helps

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: I need to delete an account record, but prevent deletion if any of the child contacts is in the active state. How can i do that?

    Hi Santosh,

    This can be done by easily using Relationship behavior called "Referential Restrict Delete".

    www.inogic.com/.../crm-relationship-behavior

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans