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 365 | Integration, Dataverse...
Answered

In Plugin development - when to select "Sync" and "Async" option?

(0) ShareShare
ReportReport
Posted on by 75

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,

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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.

  • Suggested answer
    Haig Liu Profile Picture
    Microsoft Employee on at

    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…

  • TomSD365 Profile Picture
    75 on at

    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,

  • Haig Liu Profile Picture
    Microsoft Employee on at

    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

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 80

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans