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)

Plugin Is Called Multiple Times

(0) ShareShare
ReportReport
Posted on by 55

Hello,

 

I have a problem with my CRM implementation. I have a plugin that registered to be firered when an account is created or updated.

The problem is that the plugin is called by the CRM system 6 times when an update is performed . I created a custom entity which i use to log plugin activities, but this entity is not related to my account entity. When i looked at the log entity i saw 6 execution cicles of my plugin.

If i am using the debugger and i am going realy slow only one execution is performed, but otherwise the number of executions varies from 1 to 6 . The problem is i cannot make any differences between these execution threads , i have tried context.Depth but without succes.

 

Did anyone have this problem until now.

 

Thank you.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Conor Gallagher Profile Picture
    715 on at

    Without seeing some code it's hard to put a finger on the issue. It's possible you're doing a recursive call though and CRM is killing the plugin after 6 depths. Are you updating your account entity at any stage during the plugin? If so that's your problem. When trying to make changes or additions to an entity via a pre create / pre update plugin it's better to intercept the target entity passed in through your input parameters and add / change the data in there.

    Otherwise show us some code and we might be able to help debug the problem

  • Verified answer
    tudorian Profile Picture
    55 on at

    I found the problem :)  I used in the plugin a post image, And at one point a set the values of the Target Entity to the Image. It is so stupid from my side :)

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans