Hello,
Can you please share - In Plugin development - when to select "Sync" and "Async" option? If you could provide the example scenario will be greatly appreciated!
Thanks,
Hello,
Can you please share - In Plugin development - when to select "Sync" and "Async" option? If you could provide the example scenario will be greatly appreciated!
Thanks,
Hi TomSD365,
Such as, Asynchronous processing of cascading transactions.
By default, cascading operations are performed as a synchronous transaction. For a synchronous cascading transaction, all impacted records are identified by the system. As the records are processed, they are locked by the system. Once all the changes have been completed, the records are unlocked, and the transaction is completed.
Synchronous transactions with a large number of records can cause performance issues for environments when long running transactions fail due to server timeouts. The records are locked preventing other jobs and user transactions that operate on the same records from executing. Also, long running transactions might result in a backlog of pending transactions and requests that decrease system performance and might cause work stoppage.
If an environment is encountering timeouts or degraded performance while the synchronous cascading operations are in progress, your environment could benefit by enabling the asynchronous mode.
https://learn.microsoft.com/en-us/power-platform/admin/async-cascading
Hi Haig Liu
Thank you for your email - can you please provide an examples for Sync and Async in terms of Dynamics 365 functionality?
Thanks,
Hi TomSD365,
About synchronization and asynchrony.
The most common situation I encounter is timeout occur when a large number of records are created or imported.
At this time, I would recommend asynchrony.
Create Sync plugins means user should wait until finish process the step, but you can be sure all action done.
Create Async step means user invoke the action and continue with other task, in the same time CRM with Asynchronous Service run the action when it can be done…
Hello,
The main difference between sync and async plugins is that sync plugins are executed within the execution pipeline (SQL Analogy to a transaction) so if the plugin raises an exception the transaction is rolled back. The typical scenario - let's say a user wants to see the result immediately after the save operation is performed - for example, the autoincrement of the record or pre-population of fields based on the data user populated on the form.
The Async plugin is executed asynchronously and doesn't cause immediate change to the data. The typical scenario for such operations - is any long-running operations that do not require immediate visibility for a user. It might be communication to the external systems or anything else that might take time to be executed.
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,214 Most Valuable Professional
nmaenpaa 101,156