Plugins can be triggered by a variety of events, also known as “message types,” including create, update, delete, and retrieve. These events are defined in the D365 platform and can be subscribed to by plugins.
For example, you can create a plugin that is triggered when a new account is created in D365. You can then use this plugin to perform a custom action, such as sending an email notification to the account manager. Plugins can also be triggered when a record is updated, deleted, or retrieved from D365.
In addition to the message type, plugins can also specify a stage in which they should be executed. There are two main stages: pre-operation and post-operation. Pre-operation plugins are executed before the event is processed by D365, while post-operation plugins are executed after the event is processed.
Plugins can also specify the order in which they should be executed within a stage. This is useful when multiple plugins are registered for the same message type and stage, and you want to control the order in which they are executed.
Another important aspect of plugin events is the “pipeline” in which they execute. The pipeline is a series of stages that D365 processes a message type through. Plugins can be executed in any of the stages within the pipeline, allowing them to interact with the data at different points in the process.
In conclusion, understanding plugin events is important when developing a plugin in D365. Plugins can be triggered by a variety of message types, and can be executed at different stages within the pipeline. Understanding the order in which plugins are executed and the pipeline in which they execute can help you create more effective and efficient plugins.