New Feature: Dataverse low-code Plug-ins
- Najm-us-saher Farooque
- Nov 14, 2023
- 5 min read
Many developers are familiar with Dataverse's plug-ins. Traditionally, these plug-ins were coded as .NET assemblies and registered within Dataverse. However, Microsoft has recently unveiled a fresh addition: low-code plugins. These plugins function as reusable, real-time workflows, executing defined commands within Dataverse. They operate server-side and are activated by personalized event handlers. This article aims to explore the concept of low-code plugins, detailing the process of their creation and registration. Let's delve deeper into this topic.

INTRODUCTION:
With low-code plugins, developers can craft server-side business logic without the need to manually script custom .NET code or perform manual registrations on Dataverse. These plugins reside within the Dataverse database and seamlessly integrate with Power Apps and Power Automate. Their functionalities are orchestrated using the Power Fx expression language, allowing direct interaction with Dataverse business data and external data sources through the utilization of Power Platform connectors.
TYPES OF LOW-CODE PLUGINS:
Low-code plugins come in two distinct types:
Instant: These plugins are manually executed, initiated by user action or a specific command.
Automated: Triggered by table events, these plugins activate automatically in response to predefined actions or changes within the data tables.
GETTING STARTED:
In order to create low-code plugins, it's essential to have the Dataverse Accelerator App installed within your environment. As of October 1st, 2023, all new environments come pre-installed with the Dataverse Accelerator App by default.


Run the Dataverse Accelerator App to create the low-code plugins in Power Platform.

Upon opening the app, you'll notice the option to create either instant or automated plugins. Let's proceed by creating both types to test their functionalities. We'll begin with Automated Plugins.
Automated Plug-ins:
Automated Plug-ins are activated when specific actions occur within a table, such as an update on an Account. In this instance, we'll create a plugin triggered by the update of the Business Phone field, which will subsequently update the Mobile Phone field.
Select the "Create Automated Plug-in Action" to generate the plugin. This action will prompt a form to appear. Let's carefully review and examine each field within this form.

Here's a breakdown of all the parameters:
Display Name: This is the readable name of the plugin, unchangeable after creation.
Table: Refers to the table triggering the plugin. For this case, the selection will be "Contact."
Run this plug-in when a row is: Indicates the event triggering the plugin. Here, "Updated" will be chosen.
When should this run: Specifies whether the plugin should run before or after the main operation. Selecting "Pre-Operation" for this case.
Solution: Choose the "Un-managed Solution" where this plugin's assembly will reside for deployment into another environment.
Expression: Enter a Power FX Expression for the business logic. Here, it involves setting the Mobile Phone to Business Phone upon an update of the Business Phone in Contact. The expression will be something like: Set(MobilePhone, ThisRecord.BusinessPhone)
Save the Plug-in and then let's test the functionality. I will update the Business Phone in the Contact to check if the Mobile Phone is Updated or Not
Before Update:

After Update:

Our plugin now looks like this.

Instant Plug-ins:
An instant low-code plug-in refers to custom code logic that a user manually triggers, allowing for the utilization of custom input and output parameters.
To create an instant plugin that performs the multiplication of three integers, follow these steps within the Dataverse Accelerator App:
1. Open the Dataverse Accelerator App.
2. Click on "Create an Instant Plug-in."
3. Provide a Display Name for the plugin.
4. Specify Input Parameter Names (e.g., A, B, C) and select their types from the dropdown menu.
5. Specify the Output Parameter Name (e.g., Result) and select its type from the dropdown menu.
6. Write an expression to multiply the three input parameters and assign the result to the output parameter. For instance: { Result: A * B * C }
7. Select the Solution and provide a description for the plugin.
8. Choose the Scope (Global or Entity). Table scope means the plug-in is triggered within the context of a specific table record, while global scope means the operation isn't associated with a table.
9. Save the plugin.
Upon completion, your plugin will be configured to perform the multiplication of three input parameters, resulting in an outcome similar to the described process.

Sure, to test the plugin functionality:
You can either click the "Test" button directly from the same window where the plugin was created. OR
Go to the main view of the plugin, click on the plugin name or details, and then click on the "Test" button from there.
By initiating the test through either of these methods, you'll be able to verify and ensure that the plugin functions as intended by providing the necessary input parameters (in this case, three integers for multiplication) and observing the output (the resulting multiplication).

When you click on the "Test" button for the plugin, you'll be prompted to provide the required input parameters (A, B, and C in this case, representing three integers for multiplication). Once you've entered these parameters, clicking "Run" will execute the plugin.
Upon execution, the system will generate a JSON response containing the output parameter (Result) with the calculated multiplication of the provided input integers. This JSON response will display the output parameter's value, showcasing the outcome of the plugin's operation based on the provided input.

Power FX:
Power Fx is the low-code language that will be used across the Microsoft Power Platform.
You can learn Power FX from here. https://learn.microsoft.com/en-us/power-platform/power-fx/overview
Here's a breakdown of the things you can do with low-code plugins:
Create the automated and instant plugin: Low-code plugins allow you to create both automated plugins (triggered by specific actions on tables/entities) and instant plugins (manually triggered by a user) with custom input and output parameters. These plugins can execute various business logic based on your requirements.
Use Power Platform connectors in low-code plug-ins: Leverage the capabilities of Power Platform connectors within low-code plugins to interact with external systems, services, or applications. Connectors enable seamless integration and interaction with a wide range of external resources.
Invoke an instant plug-in from a Power Automate cloud flow: Integrate your instant low-code plugin within a Power Automate cloud flow. This allows for the incorporation of custom logic created in the low-code plugin as a part of your automated workflows in Power Automate.
Invoke an instant plug-in from the Dataverse Web API: Utilize the Dataverse Web API to trigger and execute your instant low-code plugin programmatically. This enables the execution of specific business logic from external applications or systems by invoking the low-code plugin via the API.
Invoke an instant plug-in from a canvas app or custom page: Integrate the instant low-code plugin within canvas apps or custom pages developed within the Power Platform. This integration enables users to trigger the plugin's functionality directly from their customized applications or pag
Within your solution, you have the ability to inspect and verify all the components that have been automatically added. These components include any automated elements that were included in the selected solution for deployment.

This feature has the potential to revolutionize development for many. For simpler and straightforward scenarios, crafting a low-code plugin can now be achieved in a matter of minutes, eliminating the need to invest time in coding and registration processes.
I trust this blog will prove beneficial to you. Stay tuned for additional blogs where we'll explore more insightful topics.
Commentaires