Study FAQ
Where should I put business logic in a Power Platform solution?
Also asked as 2
- How do I choose between a form rule, Dataverse plug-in, cloud flow and agent?
- Which Power Platform component should own validation, deferred work and AI suggestions?
Answer
Put a rule that must hold across all relevant writes at the authoritative server operation. Use form configuration, a business rule with the appropriate scope, or client JavaScript for guidance. Use a flow or an Azure-hosted worker for work that can finish after the original operation. Let an agent propose interpretations and keep acceptance under deterministic business rules.
Check existing app behavior first. Start by describing what must be true before returning success. A Dataverse plug-in can enforce an invariant on the messages it is registered to handle. A synchronous PreOperation step on a standard-table operation runs within its database transaction. A named custom API is useful when a caller explicitly requests a capability such as submitting a request. If other write paths can still change the same state, make sure they enforce the invariant as well.
For an accepted request that must also notify a team, give the notification its own pending, completed and failed outcomes. Record an operation identity and give the receiver an explicit duplicate policy before enabling retries. Azure Functions can own custom processing when you also have an owner for deployment, capacity and recovery.
An agent can suggest a request category from text. Validate its structured output and authorize the business action independently. A fixed agent-flow path can still contain a generative step. Check the design with an invalid request from an integration, a failed notification after acceptance, and an invalid proposed category.
Dataverse event framework · Dataverse custom APIs · Cloud flow error handling · Agent flows · Azure Functions overview
Full explanation
AB-400: Choosing Power Platform Extension Architectures
Study guide · AB-400
Read the full explanation