Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

When i write a plugin for updating a 100 record how many time plugin executed

Posted on by 140

Hi All,

When i write a plugin for updating 100 contact record how many time plugin executed.

*This post is locked for comments

  • Suggested answer
    Shantnu Sharma Profile Picture
    Shantnu Sharma 655 on at
    RE: When i write a plugin for updating a 100 record how many time plugin executed

    Hi Jyotsana - If I am getting the context behind this question correct then if a plugin updates 100 records at a time, then it executes once. But if a plugin updates one contact at a time, it will execute 100 times. But behind the scenes -  CRM instantiates the class only on the first activation of the plug-in. Once the object is instantiated, CRM calls the Execute method on the object and caches it (object). It doesn't dispose it and uses it for further invocation of that plugin. This cache is cleared only when you update step, assembly etc. You could read more about this.

  • Suggested answer
    shivaram Profile Picture
    shivaram 3,315 on at
    RE: When i write a plugin for updating a 100 record how many time plugin executed

    Hi Jyotsna,

    This is depends on your requirement, if you are not giving any condition but just updating  attributes, then it will give you an error because it will execute infinity times

    Thanks.

  • Suggested answer
    nghieppham Profile Picture
    nghieppham 4,755 on at
    RE: When i write a plugin for updating a 100 record how many time plugin executed

    Hi Jiotsna,

    It is depend on your business requirement.

    If you want to update 100 contact, we can design plugin which execute 1 time, you can use Execute multiple to do that.

    Regards,

  • necsa Profile Picture
    necsa 3,455 on at
    RE: When i write a plugin for updating a 100 record how many time plugin executed

    Hi jyotsna,

    if you like to to update or create rekord as plugin please refer below information and for what do you need to know how many time plugin execute?

    msdn.microsoft.com/.../dn932135(v=crm.7).aspx

    Happy coding

    Necdet Saritas

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans