Hi all,
When I custom plugin for CRM system.
I have a workflow send email notification for user or team when that record has been changed field Owner as image below:
After that I custom plugin (Post-Operation) change status (field Option Set Value) with some conditions and call CrmServiceContext with method SaveChange() as image 2 below:
When I do something to change field status. After refresh browser, status had been changed. Beside, the workflow "Email Notification Account" auto run.
Result: When I do something to change status, owner of that record will receive a email --> Spam Mail.
Anybody have solution to help me resolve this problem?
Thanks.
*This post is locked for comments
Hi Andrii Butenko,
I had resolved that problem.
Thanks a lot,
Son Dang
Hello,
As for me the easiest way is to rewrite your code to use Late Binding and IOrganizationService using only fields that you really need to update like following:
var currentAccount = new Entity("account", <account guid here>);
currentAccount["tma_status"] = new OptionSetValue(latestProjectStatus);
service.Update(currentAccount);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156