{"id":42513,"date":"2025-10-07T14:30:48","date_gmt":"2025-10-07T09:00:48","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=42513"},"modified":"2025-10-07T14:40:15","modified_gmt":"2025-10-07T09:10:15","slug":"synchronous-vs-asynchronous-workflows-in-dynamics-365-crm-best-practices-for-large-data-sets-part-1","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2025\/10\/synchronous-vs-asynchronous-workflows-in-dynamics-365-crm-best-practices-for-large-data-sets-part-1\/","title":{"rendered":"Synchronous vs Asynchronous Workflows in Dynamics 365 CRM: Best Practices for Large Data Sets \u2013 Part 1"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42517\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1.png\" alt=\"Synchronous vs Asynchronous Workflows in Dynamics 365 CRM Best Practices for Large Data Sets \u2013 Part 1\" width=\"2100\" height=\"1200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1.png 2100w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-2048x1170.png 2048w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-Best-Practices-for-Large-Data-Sets-\u2013-Part-1-660x377.png 660w\" sizes=\"(max-width: 2100px) 100vw, 2100px\" \/><\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>To overcome this, you can consider using Background Operations \u2014 a Dynamics 365 capability that allows time-consuming processes to run asynchronously without blocking user actions.<\/p>\n<h3><strong>What is Background Operation in Dynamics 365 CRM?<\/strong><\/h3>\n<p>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.<\/p>\n<h3><strong>Why use a Background Operation?<\/strong><\/h3>\n<p>Imagine a CRM administrator responsible for reassigning thousands of leads or updating thousands of account records after a territory restructure.<\/p>\n<p>If you run this as a synchronous workflow, the system processes each record sequentially \u2014 waiting for one to finish before moving to the next. This results in:<\/p>\n<ul>\n<li><strong>Slow user experience<\/strong> for everyone in the system.<\/li>\n<li><strong>Timeout errors<\/strong> and failed workflow executions.<\/li>\n<li><strong>Locked resources<\/strong>, affecting other ongoing processes.<\/li>\n<\/ul>\n<p>The synchronous process creates a bottleneck, forcing the entire organization to wait for a single workflow to complete.<\/p>\n<p>That\u2019s where Background Operations comes into the picture!<\/p>\n<h3><strong>How to Use Background Operations in Dynamics 365 CRM?<\/strong><\/h3>\n<p>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.<\/p>\n<p>Below are the practical steps to implement and monitor Background Operations effectively.<\/p>\n<h3><strong>Step 1: Navigate to Background Operations<\/strong><\/h3>\n<p>Go to Advanced Settings \u2192 Settings \u2192 System Jobs \u2192 Background Operations.<br \/>\nHere, you can view and manage all ongoing and completed background jobs.<\/p>\n<h3><strong>Step 2: Configure a Background Operation<\/strong><\/h3>\n<p>When creating a process (e.g., workflow or Power Automate flow), choose the asynchronous execution mode.<br \/>\nThis ensures your logic runs in the background instead of in real-time.<\/p>\n<h3><strong>Step 3: Monitor the Background Job<\/strong><\/h3>\n<p>Once the operation starts, you can track its progress under the Background Operations log.<br \/>\nIt displays the job\u2019s status, In<em> Progress<\/em><em>, Completed, <\/em>or<em> Failed<\/em> and helps you identify if any records encountered issue.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42514\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM.png\" alt=\"Synchronous vs Asynchronous Workflows in Dynamics 365 CRM\" width=\"944\" height=\"448\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM.png 944w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-768x364.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Synchronous-vs-Asynchronous-Workflows-in-Dynamics-365-CRM-660x313.png 660w\" sizes=\"(max-width: 944px) 100vw, 944px\" \/><\/p>\n<h3><strong>Step 4: Use Callback URLs for Notifications<\/strong><\/h3>\n<p>To get notified when a background operation completes, use Callback URLs.<br \/>\nThese URLs act as endpoints that Dynamics 365 calls once the operation finishes.<\/p>\n<p>You can configure a webhook, API endpoint, or a flow in Power Automate to handle these callbacks. This helps you:<\/p>\n<ul>\n<li>Trigger another process (e.g., send confirmation emails).<\/li>\n<li>Update dashboards automatically.<\/li>\n<li>Log the completion details for auditing.<\/li>\n<\/ul>\n<pre class=\"lang:css gutter:true start:1\">public void Execute(IServiceProvider serviceProvider)\r\n\r\n{\r\n\r\n\/\/ Services\r\n\r\nIPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));\r\n\r\nITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));\r\n\r\nIOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));\r\n\r\nIOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);\r\n\r\n\u00a0\r\n\r\ntry\r\n\r\n{\r\n\r\n\u00a0\r\n\r\n\/\/Create a request for message defined as a custom API to run in the background\r\n\r\nvar asyncRequest = new OrganizationRequest(\"sample_ExportDataUsingFetchXmlToAnnotation\")\r\n\r\n{\r\n\r\nParameters =\r\n\r\n{\r\n\r\n{\"FetchXml\",\u00a0 @\"&lt;fetch&gt;\r\n\r\n&lt;entity name='account'&gt;\r\n\r\n&lt;attribute name='accountid'\/&gt;\r\n\r\n&lt;attribute name='name'\/&gt;\r\n\r\n&lt;\/entity&gt;\r\n\r\n&lt;\/fetch&gt;\" }\r\n\r\n}\r\n\r\n};\r\n\r\n\u00a0\r\n\r\n\/\/Create a request to execute the message in the background\r\n\r\nvar request = new OrganizationRequest(\"ExecuteBackgroundOperation\")\r\n\r\n{\r\n\r\nParameters =\r\n\r\n{\r\n\r\n{\"Request\", asyncRequest },\r\n\r\n\/\/ Request a callback\r\n\r\n{\"CallbackUri\", \"YOUR CALLBACKURL\" }\r\n\r\n}\r\n\r\n};\r\n\r\n\u00a0\r\n\r\n\/\/Execute the background operation request\r\n\r\nvar response = service.Execute(request);\r\n\r\n\u00a0\r\n\r\nConsole.WriteLine($\"BackgroundOperationId: {response[\"BackgroundOperationId\"]}\");\r\n\r\nConsole.WriteLine($\"Location: {response[\"Location\"]}\");\r\n\r\n}\r\n\r\n\u00a0\r\n\r\ncatch (Exception ex)\r\n\r\n{\r\n\r\ntracingService.Trace($\"Exception: {ex.Message}\");\r\n\r\ncontext.OutputParameters[\"SuccessResponse\"] = false;\r\n\r\ncontext.OutputParameters[\"message\"] = $\"Plugin execution failed: {ex.Message}\";\r\n\r\ncontext.OutputParameters[\"SuccessCount\"] = 0;\r\n\r\ncontext.OutputParameters[\"FailureCount\"] = 0;\r\n\r\nthrow new InvalidPluginExecutionException(\"Bulk assignment failed.\", ex);\r\n\r\n}\r\n\r\n}<\/pre>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>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.<\/p>\n<h3><strong>Key takeaways:<\/strong><\/h3>\n<ul>\n<li>Use Background Operations for large data updates, migrations, and bulk assignments.<\/li>\n<li>Keep synchronous workflows only for quick, real-time actions.<\/li>\n<li>Configure Callback URLs to stay informed automatically when jobs finish.<\/li>\n<\/ul>\n<p>In <strong>Part 2<\/strong>, we\u2019ll walk you through the technical setup \u2014 including examples of configuring asynchronous processes, integrating call backs, and optimizing performance for enterprise-scale workflows.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2025\/10\/synchronous-vs-asynchronous-workflows-in-dynamics-365-crm-best-practices-for-large-data-sets-part-1\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,2361],"tags":[3239],"class_list":["post-42513","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-technical","tag-synchronous-vs-asynchronous-workflows-in-dynamics-365-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/42513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=42513"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/42513\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=42513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=42513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=42513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}