Instiq
Chapter 3 · Extend the platform: plug-ins·v1.0.0·Updated 6/30/2026·~14 min

What's changed: Created PL-400 Chapter 3 (domain: Extend the platform, part 1 = plug-ins): Dataverse plug-ins (pipeline stages pre-validation/pre-operation/post-operation, sync/async, execution context IPluginExecutionContext, Pre/Post Images, Organization service CRUD, sandbox/performance, Plug-in Registration Tool) and custom APIs and business events (custom API message bound/unbound, Dataverse business events, plug-in implementation).

3.1Dataverse plug-ins

Key points

Understand the execution pipeline stages, sync/async, the execution context, Pre/Post Images, the Organization service, performance, and the Plug-in Registration Tool.

A plug-in injects server-side business logic into Dataverse events. The design core is when and at which stage it runs.

3.1.1Execution pipeline stages

Register a plug-in at a pipeline stage: pre-validation (outside the transaction, first—input validation/pre-auth checks), pre-operation (in transaction, before the DB write—adjust values), post-operation (in transaction, after the DB write—related updates/notifications), in that order. Also choose synchronous (immediate, user waits, rolls back on exception) or asynchronous (runs later as a system job—for heavy work).

3.1.2Execution context and images

From the execution context (IPluginExecutionContext) you read InputParameters/OutputParameters/Depth (loop prevention), etc. If you need before/after values, register a Pre Image (record values before the operation) and a Post Image (values after). Data operations use the Organization service (IOrganizationService) CRUD (Create/Retrieve/Update/Delete).

3.1.3Performance and registration

Plug-ins run in a sandbox (isolated execution) with limits (e.g., a 2-minute timeout), so offload heavy work to async or Azure. Throwing an exception in a synchronous plug-in rolls back the transaction. Register steps (message/table/stage/images) with the Plug-in Registration Tool.

Exam point

Cues: "outside transaction, first, input validation" = pre-validation. "before DB write, adjust values" = pre-operation. "after DB write, related updates" = post-operation. "immediate, rolls back on exception" = synchronous. "heavy work deferred" = asynchronous. "before-values" = Pre Image; "after-values" = Post Image. "server CRUD" = Organization service. Register = Plug-in Registration Tool.

Warning

Watch the mix-ups: (1) pre-validation (outside transaction) vs pre-operation (inside). (2) Do not swap Pre Image (before) and Post Image (after). (3) Sync (wait/rollback) vs async (deferred). (4) Do not put heavy work in a sync plug-in (timeout). (5) Organization service (server) vs Client API (client).

Diagram: the plug-in execution pipeline—pre-validation (outside transaction, first, input validation)/pre-operation (inside, before DB write, adjust values)/post-operation (inside, after DB write, related updates); synchronous (waits, rolls back on exception) vs asynchronous (system job, heavy work); Pre Image (before-values)/Post Image (after-values); CRUD via the Organization service; register with the Plug-in Registration Tool.
Choose the stage

3.1.4Section summary

  • Stages = pre-validation (outside)/pre-operation (before)/post-operation (after); sync vs async
  • Pre Image=before / Post Image=after; CRUD via Organization service; Depth from context
  • Sandbox execution; heavy work to async/Azure; register with Plug-in Registration Tool

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. You want a plug-in to update related records/send notifications after the DB write. Best stage?

Q2. You want to run first, outside the transaction, for input validation and pre-auth checks. Best stage?

Q3. In a plug-in, you want the "values before" an update operation. Best?

Q4. You want a plug-in to run heavy, time-consuming work while avoiding timeouts/user waits. Best?

Q5. From a plug-in, you want server-side CRUD on Dataverse records. Best?

Check your understandingPractice questions for Chapter 3: Extend the platform: plug-ins

Keep track of your progress

The full study guide is free to read. Sign up free to practice with the question bank, track what you have read, review your mistakes, and highlight passages.