Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Deactivate the parent record and the related active child records

(0) ShareShare
ReportReport
Posted on by 873

Hello,

Upon deactivation of the parent record in a table, I want to deactivate all the child records related to the parent. as I want to set their status to Inactive.

I believe there is no OOB feature that does that and it requires a custom plugin/workflow.

What will be logic to get all child records related to the parent entity in a query from different tables and deactivate them in bulk?

pastedimage1682537112459v2.png

Can someone provide an example or documentation guidance to achieve the above?

Any help is greatly appreciated.

Best regards,

EBMRay

  • Suggested answer
    Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Deactivate the parent record and the related active child records

    Hi EBMRay,

    If you want to deactivate all contacts related to an account whenever the account is deactivated.

    You can try this solution without having to write any code: How to cascade activate / deactivate (SetState) in CRM - Microsoft Dynamics CRM Community

    Hope this link help you!

    Best Regards,

    Sayen Zhang

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Deactivate the parent record and the related active child records

    Hello,

    If you're ok with Async processing I would say the easiest way to design the Power Automate flow. You can see a good example here - carinaclaesson.com/.../

    If you want this to happen in a sync way you will have to use a plugin - himbap.com/.../

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 Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,540 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans