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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans