Every CRM professional has faced this at some point: a workflow that performs flawlessly in testing but slows everything down when deployed at scale. You must have encountered this while handling a bulk update of 10,000 account records during a data migration in Dynamics 365 CRM.
Although triggering a synchronous workflow in Dynamics 365 CRM may seem straightforward, it is not ideal for large-scale operations. When handling bulk record updates, the system may experience performance issues, including frozen screens, delayed processes, and timeout errors that flood the logs. This highlights a key best practice: synchronous workflows are not designed for high-volume or resource-intensive tasks.
To overcome this, you can consider using Background Operations — a Dynamics 365 capability that allows time-consuming processes to run asynchronously without blocking user actions.
In Dynamics 365 CRM, a Background Operation refers to a process or task that runs asynchronously in the system, meaning it executes in the background without blocking user interactions. These operations are designed to handle long-running, resource-intensive, or bulk processes that could otherwise slow down the system if run synchronously.
Imagine a CRM administrator responsible for reassigning thousands of leads or updating thousands of account records after a territory restructure.
If you run this as a synchronous workflow, the system processes each record sequentially — waiting for one to finish before moving to the next. This results in:
The synchronous process creates a bottleneck, forcing the entire organization to wait for a single workflow to complete.
That’s where Background Operations comes into the picture!
Background Operations in Dynamics 365 CRM are designed to handle long-running and resource-intensive processes asynchronously, meaning they run in the background while users continue working without interruption.
Below are the practical steps to implement and monitor Background Operations effectively.
Go to Advanced Settings → Settings → System Jobs → Background Operations.
Here, you can view and manage all ongoing and completed background jobs.
When creating a process (e.g., workflow or Power Automate flow), choose the asynchronous execution mode.
This ensures your logic runs in the background instead of in real-time.
Once the operation starts, you can track its progress under the Background Operations log.
It displays the job’s status, In Progress, Completed, or Failed and helps you identify if any records encountered issue.
To get notified when a background operation completes, use Callback URLs.
These URLs act as endpoints that Dynamics 365 calls once the operation finishes.
You can configure a webhook, API endpoint, or a flow in Power Automate to handle these callbacks. This helps you:
public void Execute(IServiceProvider serviceProvider) { // Services IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); try { //Create a request for message defined as a custom API to run in the background var asyncRequest = new OrganizationRequest("sample_ExportDataUsingFetchXmlToAnnotation") { Parameters = { {"FetchXml", @"<fetch> <entity name="account"> <attribute name="accountid"/> <attribute name="name"/> </entity> </fetch>" } } }; //Create a request to execute the message in the background var request = new OrganizationRequest("ExecuteBackgroundOperation") { Parameters = { {"Request", asyncRequest }, // Request a callback {"CallbackUri", "YOUR CALLBACKURL" } } }; //Execute the background operation request var response = service.Execute(request); Console.WriteLine($"BackgroundOperationId: {response["BackgroundOperationId"]}"); Console.WriteLine($"Location: {response["Location"]}"); } catch (Exception ex) { tracingService.Trace($"Exception: {ex.Message}"); context.OutputParameters["SuccessResponse"] = false; context.OutputParameters["message"] = $"Plugin execution failed: {ex.Message}"; context.OutputParameters["SuccessCount"] = 0; context.OutputParameters["FailureCount"] = 0; throw new InvalidPluginExecutionException("Bulk assignment failed.", ex); } }
Large-scale or long-running workflows can easily overwhelm Dynamics 365 when executed synchronously. Background Operations solve this by executing tasks asynchronously, ensuring the system remains responsive and users can continue working without interruption.
In Part 2, we’ll walk you through the technical setup — including examples of configuring asynchronous processes, integrating call backs, and optimizing performance for enterprise-scale workflows.
The post Synchronous vs Asynchronous Workflows in Dynamics 365 CRM: Best Practices for Large Data Sets – Part 1 first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.