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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

WF being called twice

(0) ShareShare
ReportReport
Posted on by

Greetings Everyone,

On a custom entity, I have a field (Single Line) on which it contains specific data, a plugin is fired.

However during closure of a record on that entity (from a On-Demand Dialog), the field is going under the update-event which is causing the plugin to execute twice.

It a an OOB WF which is updating (or setting) the value on the Single Line field ONLY during CREATE of record.

However, I could see on the Audit History that the field is being updated from elsewhere.

Is there any workaround/solution to avoid this in D365?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Clem Profile Picture
    2,541 on at

    Hello,

    Can you check the Depth of the plugin ? I assume that if it is triggered twice you should get a Depth = 0 for the first execution and Depth = 1 on the second one.

    You could filter the execution of the Plugin logic based on that value (this is used to avoid infinite loop or too many executions of the same plugin).

    You can have a look at this great article : crmbusiness.wordpress.com/.../stopping-infinite-plugins-with-parameters-depth-and-parentcontext

    Regards,

    Clément

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans