Introduction
Microsoft Dataverse solutions often reach a point where business rules and Power Automate flows can't fully express the logic a process requires. Sometimes a solution needs to validate data across related tables at the moment a record saves, stop an operation before it commits, or call out to another service synchronously. For these needs, developers turn to plug-ins to extend Dataverse with custom, event-driven code.
Consider Contoso, a company that runs an internal equipment-provisioning system built as a custom Dataverse solution. Four tables—Employee, Device, Request, and Allowance—track replacement requests, eligibility, availability, approval, and fulfillment.
A business rule can't reach across tables to check allowance balances, and a flow can't reliably block a save before it happens. Contoso's developers write a plug-in instead, giving them control when a request is created, updated, or approved.
In this module, you explore how the event execution pipeline structures these moments, and how a plug-in taps into that pipeline through the execution context. You learn how to read an incoming request's data and use pre-images and post-images to compare values before and after an operation. You also learn to use the Organization service to perform additional operations as part of the same transaction. You also learn how to register a plug-in so Dataverse knows when to run it.
By the end of this module, you're able to write a working, registered plug-in that implements business logic in response to a Dataverse event.