Hi All,
When i write a plugin for updating 100 contact record how many time plugin executed.
*This post is locked for comments
Hi All,
When i write a plugin for updating 100 contact record how many time plugin executed.
*This post is locked for comments
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.
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.
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,
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156