CRM Crate

[Step by Step] Building & implementing Low Code Plug-ins within Dataverse

We will learn to build & implement Low Code Plug-ins within Dataverse / Power Apps. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.

[Step by Step] Building & implementing Low Code Plug-ins within Dataverse

Overview

Microsoft Dataverse provides a robust approach to enhance data architecture efficiency and diminish client-side processing demands by utilizing low-code plug-ins. These plug-ins are reusable, real-time workflows that execute designated commands within Dataverse, operating on the server-side and activated by custom event handlers.

In the past, plug-ins were developed as custom classes compiled into a .NET Framework assembly, which were subsequently uploaded and registered in Dataverse. Nevertheless, the arrival of low-code plug-ins now allows users to developer & configure these event handlers with little to no coding, eliminating the necessity for manual registration.

Dataverse Low-code plug-ins reside within a Dataverse data-model and can be effortlessly incorporated into Power Apps and Power Automate. The workflow’s behavior is determined using the Power Fx formula / expression language and can establish direct connections with Dataverse business data and external data sources via Power Platform connectors. Thanks to low-code plug-ins, developers can swiftly build simple workflows with minimal coding knowledge, leading to a more efficient and streamlined data architecture.


Advantages of server-side logic

Server-Side customizations provide multiple benefits as stated below.

Better Scalability

Server-side logic can be scaled with greater ease compared to client-side logic, facilitating improved performance and enhanced management of heavier workloads.

Enhanced Performance

By executing on the server, business logic has the potential to decrease the volume of data that must be transmitted between the client and server, leading to quicker processing times.

Easier maintenance and upgrades

Through the centralization of business logic on the server, maintenance and updates become more convenient, as modifications can be implemented in a single location instead of necessitating updates across multiple clients.

Improved Security

As server-side logic runs on the server, it can aid in preventing unauthorized access to sensitive data or table rows.

Reliability & Consistency

Server-side logic guarantees the consistent application of business rules across all clients, mitigating the risk of errors or disparities.

Understanding Low Code Plug-ins

Low-code plug-ins are Power App components that enable you to incorporate business logic into your applications using the Power Fx forumula / expression language, and seamlessly connect with Dataverse business data and external data sources through Power Platform connectors. These low-code plug-ins empower you to rapidly construct robust workflows without the need for any manual coding.

There are two types of low-code plug-ins supported in Dataverse as given below.

TypeTriggerSupports parametersSupported scope
InstantManually runYesGlobal and table
AutomatedDataverse table eventNoTable

Instant Plug-ins

An instant low-code plug-in is custom code logic that is manually triggered by an application user. Custom input and output parameters can be used in this scenario.
PropertyDescription
ScopeThis is a setting used to link a plug-in with a particular table / entity. This setting can be configured as either “table” (referred to as “entity”) or “global.” In the context of table (entity) scope, the plug-in is activated within the context of a specific table record, while global scope indicates that the operation is not linked to a particular table (for more information, see link).
ParametersParameters allow you to pass information between the plug-in and the context that runs it, making it easier to design business logic that can be reused in varying situations.
Input parameters are used to provide data to the plug-in, and allow you to control how the function behaves by passing in different values you specify in the Power Fx formula.
Output parameters allow you to retrieve the results of a function or method for further use in your program.
Supported data types: Boolean, String, Float, Decimal, Date Time & Integer

Automated Plug-ins

An automated low-code plug-in is custom code that is triggered and executed in response to a particular data event.
PropertyDescription
Data eventIndicates which data event triggers the plug-in. Any of the following events can be selected to invoke the plug-in: Create, Update & Delete
StageYou have the ability to determine whether the plug-in operates prior to or following the completion of the data event, offering the flexibility to access and modify values at crucial stages of the event.
Pre-operation. Select this option if you want to run your plug-in logic after the form validation, but before the values are inserted or changed in Dataverse.
Post operation. Select this option to run your plug-in logic after the values have been inserted or changed in Dataverse.

What are the Prerequisites for building a Low Code Plug-in?

Below are the basic prerequisites for creating low code Plug-in.

Sr NumberPrerequisites
1User with System Admin / System Customizer security role.
2Access to the Dataverse accelerator app.

Steps for building a Low Code Plug-in

Step 1: Login with an admin user in Power Apps and play the Dataverse Accelerator App as shown below.

Note: – If you do not have Dataverse Accelerator App pre-installed in your environment, then navigate to the below given link to install Dataverse Accelerator.
Dataverse Accelerator ‘App Source’ Link – Click Here.

Step 2: Within the Dataverse Accelerator app, you can find options to create new low code Plug-ins as shown in the below interface.

Step 3: For demo purpose, we will create a new ‘Instant Plug-in’ as per the details given below.

  1. Display Name: Name of your plug-in.
  2. Parameters: Define input and output parameters for your plugin. The input parameters will be supplied to the plugin and the output parameters will be released out by the plug-in in form of response or outcome. In our case, we will be providing an input parameter as ‘Total Revenue’ and the plugin will divide the ‘Total Revenue’ by 30 and provide its output as ‘Daily Revenue’ in an output parameter.
  3. Expression: You can write your Power FX expression here for performing the data computation and operations.
  4. Solution: Select the solution where you want to deploy and store the plug-in.
  5. Name: Define a schema / logical name for your plug-in.
  6. Description: Define a descriptive text for your plug-in.
  7. Scope: You can define the scope for your plug-in. If the scope is set to entity, use ThisRecord to access column values in the table row associated with the plug-in run, such as ThisRecord.'CRM Crate Field Name'.
  8. Select Save once done.

Note: – You can also add connection references to your plugin by clicking on the connection icon as shown below.

Step 4: Now lets test your newly created low code plug-in. Within the same window, click on ‘Test‘ for testing / debugging the plug-in.

As a conclusion, we understood the fundamentals of new low code Plug-ins & learned the basics for creating a new low code Plug-ins in Power Apps.


5 1 vote
Article Rating
Subscribe
Notify of
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
تركيبات uPVC
4 months ago

ينعكس التزام المصنع بالابتكار في جهود البحث والتطوير المستمرة لتحسين تصميم ووظائف تركيبات HDPE و uPVC الخاصة بهم. إيليت بايب Elite Pipe

HDPE pipe solutions in Iraq
4 months ago

كمورد موثوق به في صناعة البلاستيك ، أنشأ إيليت بايب Elite Pipe شراكات طويلة الأمد مع العملاء الذين يقدرون منتجاتهم عالية الجودة وأدائهم الموثوق.

HDPE pipe solutions
4 months ago

Just wish to say your article is as surprising. The clearness in your post is just cool and i could assume you’re an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the enjoyable work.

error: CRM Crate Security Engine - Disabled Right Click & Selection!

Congratulations!

Well Done,
Welcome to CRM Crate

Stay tuned with us and get all latest updates and learning in Microsoft CRM and related techonologes.