web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

BulkUpdate using plugin.

(0) ShareShare
ReportReport
Posted on by

I need to update more than 100 records using plugin in CRM 2011.What will be best approach for implementing it?

Any help will be very much appreciated.

Thanks,

Gitanjali

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Hosk Profile Picture
    on at

    Why do you need to update 100 records using a plugin, could you do this just using a console app or will you need to update 100 records on a regular basis.

    if you wrote a console app you could trigger this to run outside working hours so it would have no effect on performance.

    I would say updating 100 records isn't very much so I don't think you need to worry about performance

    If I was to do this in a plugin  I would do it so it ran Asynchronously.  this means it would run a bit like a workflow and would be scheduled by CRM to run when it has the resource and unlike synchronous plugins it would not make any records wait until it's finished.

    this forum had a similar discussion and the points below are valid

    social.microsoft.com/.../synchronous-plugin-vs-asynchronous-plugin

    Plug-ins registered for synchronous processing execute immediately, whereas plug-ins registered for asynchronous processing are queued.

    That means in case of synchronous plugin the platform core operation need to wait for the completion of plugin execution.

    so you can get better performance by registering a plugin to execute asynchronously.

    But when , to opt for an aync registration depends on your  requirements.

    Go through the below links for better understanding:

    www.devx.com/.../1954

    msdn.microsoft.com/.../cc151086.aspx

    msdn.microsoft.com/.../cc150926.aspx

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    When you say 'using a plugin' - I presume that means that there is some user initiated action that results in a plugin firing (say a record update?) - if this is the case you will be able to perform your updates in the plugin transaction using the IOrganizationService passed to the plugin context - however you need to be aware of the request timeout. If your updates are going to be taking more than 1-2 minutes , then I wouldn't suggest this option of using a plugin transaction because you will hit this limit (see msdn.microsoft.com/.../gg327941.aspx and social.technet.microsoft.com/.../12601.crm-2011-timeouts-and-limits.aspx)

    It might be better to create a Custom Workflow activity that does the updates since workflows are not subject to the same request/sandbox plugin timeouts.

    You also might consider moving your updates to a client batch process if it doesn't need to run on the CRM server triggered by a user and is only run infrequently. If you are using a batch process that isn't running on the server you could use ExecuteMultiple to submit a batch of updates in one request - msdn.microsoft.com/.../jj863631.aspx

    Other options are a manual export to excel and mark for reimport.

    Hope this helps,

    Scott

  • Suggested answer
    Karth Profile Picture
    on at

    What's your requirement exactly? If this is one-time update, you could consider configuring an on-demand process.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans