Search code examples
pluginsdynamics-crmworkflowmicrosoft-dynamicsdynamics-crm-online

How to execute a long running task in Microsoft Dynamics CRM and overcome the 2 minutes limitation?


I created a plugin that runs on update when updating 3 fields, the plugin will run a fetchXML and get the records from another entity that has the first record Guid as a lookup then I will apply a loop to update those records with the value of the 3 fields (the fields that have changed).

The problem is that the fetchXML return 1290 records (and it could be more or less) but there is a time limit of execution which is 2 minutes, this limitation apply to both plugin and custom workflow (sync or async), from my research you can't override this limitation in Dynamics crm online.

I really don't know how to solve this issue, it seems I can't use a console app either.

Are there any other possibilities?


Solution

  • In those situations - we will move the long running code to Azure Function and invoke it from the plugin.

    Read more