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

  • Suggested answer
    Clem Profile Picture
    2,541 on at
    RE: WF being called twice

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans