Citizen Developer
explore our new search
Use PowerFx to Directly Call Actions in Dataverse: A Guide
Image Source:
Microsoft Dataverse
Sep 28, 2023 1:27 PM

Use PowerFx to Directly Call Actions in Dataverse: A Guide

by HubSite 365 about Rajeev Pentyala

Senior Software Engineer at Microsoft Power CAT Team

Citizen DeveloperMicrosoft DataverseM365 Hot News

Explore PowerFXs new feature to call Dataverse actions directly, improving Power Apps performance and simplifying API calls.

An Overview of A New Experimental Feature in Microsoft Dataverse

The blog post by Rajeev Pentyala explicates about a new experimental feature that allows the operability of Dataverse actions directly in PowerFx. This feature, which is in its experimental stage, represents a significant leap in the streamline functionality within Power Apps. It allows users to promptly access the Dataverse custom API within a Power Fx formula.

This feature is especially beneficial as it spares the necessity of creating a Power Automate Flow. Thus, enhancing the system's performance especially when multiple Dataverse actions need to be invoked. It essentially simplifies the call to Dataverse operations using the new PowerFX language element - the Environment object.

The experimental feature can be enabled from Canvas Studio through a path: Settings -> Upcoming features -> Experimental. Users only have to turn on the 'Enable access to Microsoft Dataverse actions' toggle.

Utilizing the Feature

Rajeev proceeds to explain how to effectively use this feature, providing a step-by-step guide on connecting to a Custom API directly in PowerFx formula without a Power Automate flow. The guide gives a detailed account of using a unique custom API - 'cat_onboardcustomer', using this as the reference point for the tutorial.

The custom API 'cat_onboardcustomer', which already exists in his system, has a request Parameter termed 'cat_customername' of type 'String'. Equipped with the knowledge of this Custom API, Rajeev sets out to explain how to invoke the API in PowerFx by creating a simple canvas app.

Within the canvas app, users need to follow a series of steps that begins with enabling the new feature in their settings and ends with adding a button on the Canvas App. This triggers the PowerFx formula, causing the 'cat_onboardcustomer' API to execute using the 'Environment' data source and passing 'cat_customername' request parameter in JSON format.


Power Apps' new experimental feature expands its capabilities, empowering users by directly invoking Dataverse tasks in PowerFx. This feature substantially boosts the application's performance, particularly when several Dataverse procedures are required, offering more intuitive and easily accessible interactions with the platform's data handling system.

The enhanced API operability reduces dependence on the Power Automate Flow, making the process leaner and more streamlined. In the world of Power Apps, this is yet another milestone that augments the user experience by providing the simplicity and power needed to create highly functional applications.

Read the full article [Experimental Feature] Call Dataverse actions directly in PowerFx

Microsoft Dataverse - Use PowerFx to Directly Call Actions in Dataverse: A Guide

Learn about [Experimental Feature] Call Dataverse actions directly in PowerFx

Learning to directly invoke Dataverse actions within Power Fx formulae is now easier than ever, thanks to an experimental feature introduced by Microsoft. This article guides readers through the steps to use this feature, effectively boosting the performance of their apps. This feature doesn't necessitate the creation of a flow in Power Automate, making it a significant time-saver.

Moreover, calling Dataverse actions via the Power Fx language element 'Environment' is much simpler now. The new feature allows authors to venture into the environment and manipulate the actions therein, ergo providing a more immersive user experience. However, note that this feature is still in development phase and can be accessed from the settings menu in the Canvas Studio.

In this guide, we'll delve into utilisation of the feature to call a Custom API directly from Power Fx formulae, eliminating the need for a Power Automate flow. As a precondition to this, readers need to be acquainted with the Custom API they intend to use. For illustrative purposes, we'll use a Custom API named 'cat_onboardcustomer'.

Let's get familiar with the structure of 'cat_onboardcustomer'. It comprises a request parameter named 'cat_customername' of the 'string' type. Now that we are familiar with our custom API, let's transition into leveraging it via Power Fx by designing a simple canvas application.

To initiate the process, create a Canvas App. Venture into the Settings menu to access the 'Upcoming features' and then 'Experimental'. Flip on the 'Enable access...' switch, which inherently activates a new Power Fx language object-'Environment'. This object should now be readily available as a 'Data source'.

Within the Canvas App, search for the 'Environment' Data source. After adding this data source to the app manually, create a button on the Canvas App. Under 'OnSelect' event, register the following Power Fx formula.

The formula essentially calls the 'cat_onboardcustomer' API using the 'environment' data source and passes the 'cat_customername' request parameter in a JSON format. The implementation syntax is shared in the original text for reference.

And that's it! When you play the App and hit the button, an 'Account' should be created with the name "Calling API from Power Fx is awesome". In essence, the environment's transition into a directly invokable entity tremendously simplifies the execution of Dataverse Custom APIs and paves the path for an optimised Power Apps user experience.

More links on about [Experimental Feature] Call Dataverse actions directly in PowerFx

Call Dataverse actions directly in Power Fx
Feb 16, 2023 — As a part of the Power Fx language, authors can now directly invoke a Dataverse action within a formula. A new Power Fx 'Environment' language ...
[Experimental Feature] Call Dataverse actions directly in ...
Mar 1, 2023 — Steps to call Dataverse actions directly from Power Fx: · Create a Canvas App. · Open Settings -> Upcoming features -> Experimental. Turn on the ' ...
Calling Dataverse actions in Power Fx
Mar 19, 2023 — Calling the Dataverse actions will be done by using the new Power Fx Envrionment language element. This new feature will be available for Power ...


PowerFx, Dataverse actions, Experimental feature, Call Dataverse, PowerFx Dataverse, PowerFx feature, Experimental Dataverse, PowerFx actions, Direct Dataverse, PowerFx Experimental feature