Pros and cons of different components for building business logic and user interface in Model-driven apps. The post is inspired by the talk Carmen Ysewijn had at the Nordic Summit community event in Stockholm in 2022. To see the presentation you can find the link here The complete toolbox for designing your model-driven app solutions.
- Defined for a table
- Acts on a form or table level
- Default value
- Field value
- Show or hide fields
- Validate data and show error messages
- Set field optional/required
- Clear field values
- Create business recommendations based on business intelligence.
- No use of related records’ information
- No interaction with sections/tabs of a form
- No error handling
- Only work if all fields used in the rule are present on the form (visible or
- No control over the order of execution of multiple business rules for one form/table
- Can only set fields based on fixed values or values from the record itself
- Business rules don’t work with multi-select option sets.
Workflows are usually used to automate business processes by initiating automation that doesn’t require any user interaction.
- Defined related to a table
- On-demand or automated
- Synchronous or asynchronous
- Use code steps
- A limited number of actions
- Only interact with Dataverse and
other services that provide actions
Power Automate Cloud Flows
Power Automate is used to automate business processes. Can be triggered either automatically, instantly, or via a schedule. For instance, perform tasks like sending notifications, moving data between data sources, creating/updating/deleting rows based on different events, and more.
- Instant, automated, or scheduled
- Can connect to other data sources or services
- Complex logic and loops are possible
- Use all available relational data
- Always run in the background
- Cannot run synchronously
- Cannot trigger on N:N relationships
- Cannot use information from a deleted record
For more posts about Power Automate check out the Power Automate Category on the site.
(Embedded) Canvas Apps
Create apps without writing code in a traditional programming language such as C#. You can design the app by dragging and dropping elements onto a canvas, just as you would design a slide in PowerPoint. For applying logic and working with data you can create Excel-like expressions.
- Use other tables
- Pixel-perfect control over UI
- Improve visualization of
- Are not part of the form definition
but load after the form has loaded
- May require additional licensing
Link to documentation: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/getting-started
- Defined for a table
- Acts on a form
- Reacts to an event (load, change, save)
- Can interact with all elements of a form (including tabs and subgrids)
- Can include error handling
- Control over the order of operations
- Can use related record information
- Requires coding
- Can become very complex
- Not easy for non-developers
A plug-in is a .NET assembly that you can upload to Microsoft Dataverse. Classes within the assembly can be registered to specific events (steps) within the event framework. The code within the class provides a way for you to respond to the event so that you can augment or modify the default behavior of the platform.
- Linked to a table
- Interfere at a database level
- Can execute pre, during, or post transaction
- If done correctly, are the most effective way to apply business logic
- Requires coding
- If done incorrectly, can have a significant impact on performance
of your solution
Link to documentation: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/plug-ins
Power Apps component framework is used to create code components for model-driven and canvas apps. These code components can be used to enhance the user experience for users working with data on forms, views, dashboards, and canvas app screens.
- Improve visualization
- Use Dataverse API to get
- Part of the form definition
- Developer experience
- Cannot share packages/libraries across components on the same
Link to documentation: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/overview
Hope you found it useful!