Plug-in
Server-side .NET code that runs in response to Dataverse events — the most powerful customisation mechanism in the CRM-side Dynamics 365 stack.
A plug-in in Dataverse is a .NET assembly registered to run on specific Dataverse events (Create, Update, Delete, custom messages). Plug-ins execute server-side in a sandboxed environment, with full transactional context — they can read related records, throw exceptions to cancel the operation, and modify the target before write. The plug-in pipeline has four stages: pre-validation (outside the transaction), pre-operation and post-operation (inside), and an asynchronous queued path. Synchronous plug-ins block the user request; asynchronous ones queue for later. Plug-ins are the most powerful and most demanding customisation mechanism in Dataverse; modern practice favours Power Automate flows for orchestration and reserves plug-ins for transactional, performance-sensitive, server-only logic.