Supercharge your Dynamics 365 and Power Platform apps with custom Dataverse plugins

Branko Babic Categories: Knowledge Base Date 16-Jul-2025 6 minute to read
Blog 02

    Power Platform, and especially Microsoft Dynamics 365, has revolutionised the way organisations build and extend business applications.

    With its low-code tools such as Power Automate, Business Rules, and Workflows, teams can rapidly implement solutions without deep technical knowledge.

    But for many growing or enterprise-level businesses, low-code alone isn’t enough.

    What if you need to enforce complex security rules?
    What if you need to integrate with external systems in real time?
    What if your business logic goes beyond what’s possible with flows or calculated fields?

    These are real challenges we see across industries – challenges that can’t always be solved with drag-and-drop logic.

    That’s where Dataverse custom plugins written in C# become essential. They allow you to inject enterprise-grade backend logic directly into the Dynamics 365 pipeline: secure, scalable, and high-performing.

    Gartner: Microsoft named a Leader in the 2024 Magic Quadrant for Enterprise Low-Code Application Platforms


    It’s no surprise - Microsoft was once again (for the 6th year in a row) named a Leader in Gartner’s Magic Quadrant for Enterprise Low-Code Application Platforms. But being a leader doesn’t mean a one-size-fits-all solution; it means offering both rapid development tools and extensibility for complex requirements.

    If you are not familiar, Gartner Magic Quadrant is a tool that provides a graphical competitive positioning of technology providers to help investors make smart business decisions. It groups technology providers into Leaders, Visionaries, Niche Players and Challengers.

    As we can see from the latest report from October 2024, Microsoft is once again recognised as a Leader in the Enterprise Low-Code Applications Platforms.

    Blog Details 01

    Magic Quadrant for Enterprise Low-Code Application Platforms/Microsoft Power Platform
    Source: Gartner October 2024

    According to Gartner, 80% of applications will be created using low-code development by 2029. Stunning.

    Given Microsoft's ongoing investments in this platform, we predict that 2025 will be the year of Power Platform, with more organisations than ever adopting low-code as a strategic layer for digital transformation.

    But Microsoft isn’t the only one signalling this shift.

    Forrester: Low-code market heading toward $50 billion

    In its recent industry research, Forrester projects that the low-code development market will grow to nearly $50 billion by 2028, up from just over $13 billion in 2023.

    This growth is driven by rapid adoption among both citizen developers and enterprise IT teams, aiming to speed up digital delivery while reducing costs and technical complexity.

    Yet Forrester also acknowledges a key insight:

    “Organisations often hit a ceiling with low-code platforms when it comes to system integration, performance tuning, or advanced logic. That’s where professional development must step in to extend the value of these tools.”

    This aligns closely with what we’re seeing in practice. Many organisations start with low-code, but quickly reach a point where custom plugins, APIs, and backend logic become essential for scaling, integrating, or enforcing stricter business rules.

    McKinsey: Turning low code from shadow IT into strategic value

    McKinsey & Company further reinforce this trend in their analysis of low-code adoption. While they recognise the advantages low-code tools offer in democratising development, they also highlight a growing risk:

    “Without strong governance and extensibility, low-code can quickly turn into unmanaged shadow IT.”

    To mitigate this, McKinsey recommends a “fused delivery model”, where business-led low-code development is strategically paired with IT-led architecture, security, and extensibility.

    Dataverse custom plugins: The underdog tool in the Power Platform arsenal

    Custom plugins are often underrated due to the need for custom software development, as opposed to low-code solutions. But in serious Power Platform implementations, Dataverse plugins are often the missing key link.

    Plugins are custom business logic components written in C# that execute in response to events within the Dataverse (e.g., create, update, delete operations).

    This enables organisations to:

    • implement advanced validation logic
    • integrate with external systems in real time
    • enforce business rules not supported by standard workflows
    • automate calculations and custom field updates

    Use case spotlight: External incentive calculation on Opportunity Win

    In modern sales organisations, closing a deal isn’t just the end - it’s the trigger for downstream processes: incentive distribution, finance reconciliation, and more.

    Let’s dive into a real-world use case we implemented for a client, which involved:

    • listening to an Opportunity closure (status = “Won”)
    • calling an external API to fetch incentive data
    • calculating final incentive amounts
    • storing the results in a custom Dataverse table

    This kind of integration cannot be done with Power Automate alone. It requires real-time execution, extended calculation logic, structured error handling, and secure backend communication.

    Business scenario

    A company rewards its sales team with incentives based on multiple criteria (deal size, product type, region, and more). Once an Opportunity is marked as Won, the system must:

    1. Call an external Incentive Calculation API
    2. Retrieve the incentive breakdown (base bonus, performance multiplier, territory bonus)
    3. Calculate final payout
    4. Store the result in a custom table in Dataverse

    High-level architecture overview

    Blog Details 02 (1)

    System context diagram

    Implementation overview

    The steps required to achieve this functionality are as follows:

    1. Create a custom table in Dataverse - IncentiveResult

    • Stores all required fields for incentives and bonuses, including BaseBonus, PerformanceMultiplier, TerritoryBonus and FinalPayout

    2. Register a plugin step on Opportunity Close

    • Message: CloseOpportuinity
    • Primary Entity: opportunity
    • Execution Mode: Synchronous
    • Trigger: Salesperson closes and Opportunity as Won

    3. Write the plugin code

    • Class Name: CalculateIncentivePlugin
    • Responsibilities:
      - Call the Incentive Calculation API
      - Retrieve breakdown values (BaseBonus, PerformanceMultiplier, TerritoryBonus)
    • Calculate Final Payout
    • Create a record in IncentiveResult

    Step-by-step simplified code example

    Step 1 - Create the Plugin Class and Context

    Every Dataverse plugin starts by implementing IPlugin and retrieving the execution context and organization service from the IServiceProvider.

    Blog Details 03 (1)

    Step 2 - Check if the Plugin Should Run

    Before doing any work, validate the input parameters and ensure the trigger is for a Won Opportunity.

    Blog Details 04

    Step 3 - Retrieve Opportunity Data

    We pull the full Opportunity record so we can pass its details to the external Incentive API.

    Blog Details 05

    Step 4 - Call the External Incentive API

    Blog Details 06

    The method CallIncentiveApi looks like this:

    Blog Details 07

    Step 5 - Store the Incentive Calculation in Dataverse

    Finally, we create a new record in the new_incentiveresult table with all incentive details.

    Blog Details 08

    Recap

    This plugin does four things:

    1. Validates that it’s running on a Won Opportunity.
    2. Retrieves relevant Opportunity data.
    3. Calls an external API for incentive calculation.
    4. Stores the result in a custom Dataverse table.

    Exploring additional scenarios for Dataverse custom plugins

    There are many potential cases that can be handled by Dataverse plugins:

    1. A company wants to enforce data access restrictions based on a user's department. For instance, only users in the same department as the record owner can update certain sensitive fields (such as salary or performance score).
    2. When a new Opportunity is created, the system must validate that the associated Account has at least one active Contact, or otherwise prevent Opportunity creation.
    3. When a Product is added to a Quote, the system must calculate a custom pricing model that considers tiered pricing, customer discount levels, seasonal offers, and past purchases.
    4. When a Case is resolved, data must be pushed to a third-party ticketing or reporting system via a secure API call.
    5. For compliance reasons, a client wants to log every change made to specific fields (e.g., bank account, tax ID) in a custom audit table.

    Limitations of Dataverse plugins

    While powerful, plugins come with certain limitations.

    The two main drawbacks of Plugins are:

    1. Two-minute timeout execution
    2. Custom development in C# needed

    The first issue can be mitigated in various ways. For example, on one project, we faced this limit due to complex calculations that took time. To address it, we implemented Power Automate as a middleman to orchestrate the calling of plugin steps and handle possible timeout errors.

    Blog Details 09

    Simplified example of error-handing with Power Automate Flow

    When it comes to the second issue, it requires software development knowledge and best practices that citizen developers customising Power Platform typically do not have.

    How we can support your journey

    Exploring tools like Power Apps, Power Automate, Power BI, Copilot Studio or other Dynamics 365 applications can open up a lot of possibilities, but it often comes with questions around what’s the best fit, how far these tools can go, and when custom development makes sense.

    That’s where we come in.

    We’ve worked with clients across industries on a range of Power Platform and Dynamics 365 projects – from creating custom Power Applications and integrating Power Pages Portal to implementing help desk functionality with Dynamics 365 Customer Service.

    In many cases, we’ve joined teams after they hit limitations with low-code alone, helping them extend their setup, improve performance, or simplify the experience for users.

    If you're looking for a partner to help you get more out of Dynamics 365, we’d be happy to talk.

    branko-babic-our-team-4.png
    Branko Babic Software Engineer

    I’m Branko, a Software Developer and Functional Consultant with 8+ years’ experience in C#, .NET, Python, and the Power Platform. Outside work, I enjoy family time, playing with my kids, and basketball.

    Real People. Real Pros.

    Send us your contact details and a brief outline of what you might need, and we’ll be in touch within 12 hours.