Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugin executed twice?

(0) ShareShare
ReportReport
Posted on by 270

Hello Community,

I try to fulfilled my Order in the plugin by the request "FulfillSalesOrderRequest", But when executing this request, The same plugin is fired again containing in the target attributes "datefulfilled".

Is the second execution a normal performance of the plugin? currently we are having issue with this second execution of the plugin.

Best regards.

*This post is locked for comments

  • lawix10 Profile Picture
    lawix10 332 on at
    RE: Plugin executed twice?

    Please I have similar issues, but this only happens in the production environment.

    It doesn't happen in DEV

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin executed twice?

    Hi Don,

    Please do check the filtering attributes property in plugin step.

    If the option is set as all attributes this behavior can occur.

    Make sure you are only selecting those fields that will act as triggering point.

    As told by Alex you can avoid this in code using depth property of context.

    Hope this helped.

    Thanks

    Phanidhar

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,477 on at
    RE: Plugin executed twice?

    Hi,

     if the plugin is configured to run on the update, for example, it will run for ANY update, including the updates made by the plugin itself. You will usually have two options:

    - Make sure you have configured triggering attributes correctly on the plugin step - don't add those attributes that you don't need to track

    - Add a condition for the context.Depth at the beginning of the plugin code  (for example, do nothing if context.Depth > 1)

  • RE: Plugin executed twice?

    Hi Don,

    The plugin should not be executing twice. Do you have any other plugins that are showing this behavior? Was the plugin registered in two different steps? Is there anything in the code that would cause it to iterate twice?

    Regards,

    David

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans