Skip to main content

Notifications

Announcements

No record found.

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.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: URGENT: Is it possible to create a workflow for Entity Contact that automatically delete Opportinity when contact set to delete

    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.

  • Verified answer
    Bipin D365 Profile Picture
    28,961 Moderator on at
    RE: URGENT: Is it possible to create a workflow for Entity Contact that automatically delete Opportinity when contact set to delete

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,869 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,733 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans