Dynamics 365 Plugin Execution Pipeline

5 Comments

In Dynamics 365, when a plugin is run, it executes based on a pipeline execution model.

Plugins can be triggered by:

  • A user action in the Dynamics 365 user interface, such as retrieving a record
  • Events triggered by the Organization Service or the WebAPI, such as retrieving a record

Post-Operation events in the pipeline are processed either:

  • synchronously – these plugins are are executed immediately and run in a specific order
  • asynchronously – these plugins are executed by the Queue Agent and run later by the async service

Other events are processed synchronously.

The event pipeline is as following:

EventStage nameStage numberDescriptionSync/Async
Pre-EventPre-validation10Executes before the main system operation and outside the database transaction.Sync
Pre-EventPre-operation20Executes before the main system operation and executed within the database transaction.Sync
Platform Core OperationMainOperation30This is the actual platform operation. No plugins registered here.
Post-EventPost-operation40Executes after the main operation and within the database transaction (if sync).Sync and Async

Plug-ins that execute during the database transaction and pass an exception back to the platform cancel the core operation.

The pipeline is detailed here.

 

Carl de Souza
Keep learning. Keep building.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.

Subscribe on YouTube →
Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert

5 Responses to Dynamics 365 Plugin Execution Pipeline

  1. I read your blog and I really Liked this information over (pre-operation) but plz start to shoot youtube videos.
    How to access attribute values that have been entered we want to validate if there is any record that already exists in the database and how to access those attribute values.

    Basically , how to get Attribute values that user has entered without GUID

Leave a Reply

Your email address will not be published. Required fields are marked *