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.
Hi Yaho,
Maybe you can try to use flow to achieve it, which can easily delete related records.
Go Power Automate(https://us.flow.microsoft.com/en-us/ )
You can also use flow to set other action as your need.
(1) Send email.
(2) Update contact with blank fields.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
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.
Muhammad Shahzad Sh...
51
Most Valuable Professional
Ramesh Kumar
42
David Shaw_UK
27