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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

URGENT: Is it possible to create a workflow for Entity Contact that automatically delete Opportinity when contact set to delete

(0) ShareShare
ReportReport
Posted on by

I wrote a workflow that checks the contact for deletion and then send email and make empty some fields in the contact.

I also want to delete the opportunity for this contact, but the opportunities are in the sub grid, what is the best way to delete the opportunity, please help me.

or this way?

Workflow: Id -> contact search  and opportunity for this contact delete (record delete),  Business Rules ??? Sub grid ?? Pugin?? Query?

Thanks you for helping.

I have the same question (0)
  • Verified answer
    Bipin D365 Profile Picture
    28,995 Moderator on at

    Hi,

    You can either achieve your requirement with Custom Workflow/ Plugin.

    In C# code, based on Contact ID you will fetch all related opportunity and delete using Organizationservice code.

    Please mark my answer verified if i were helpful

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Yaho,

    Maybe you can try to use flow to achieve it, which can easily delete related records.

    pastedimage1606119797041v2.png

    Go Power Automate(https://us.flow.microsoft.com/en-us/ )

    pastedimage1606119785664v1.png

    You can also use flow to set other action as your need.

    (1) Send email.

    pastedimage1606120438080v4.png

    (2) Update contact with blank fields.

    pastedimage1606120361601v3.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 25 Most Valuable Professional

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans