Skip to main content

Notifications

How to call the Microsoft Dataverse Actions in the Power Apps?

Microsoft Power Apps supports the ability to directly call synchronous Dataverse actions without having to create a Power Automate Flow. This feature will give the significant performance boost for the apps that need to call the Dataverse actions. This uses the new Power Fx language to call the Dataverse actions using the element Environment.

In this article, will explain the steps to call the Microsoft Dataverse Actions in the canvas app.

Scenario: Configured AccountNumber column in the Account Table as an Autonumber and get the upcoming Auto number using the Dataverse Action in the canvas app.

Pre-Requisite:

Click on the below article link to Turn on the Dataverse Actions feature in Power Apps.

Enable Access to Microsoft Dataverse Actions (Preview feature) in the Power Apps

Follow the below steps after Pre-Requisites.

Step 1: Click here to Open Power Apps Maker Portal in the new browser profile, created in the Prerequisite.

Or

If you are using US GCC Cloud, then follow the below article for Power Apps Maker Portal URL.

Power Apps US Government service URLs

Step 2: Choose the required Environment.

Step 3: Click on Blank App.

Step 4: Click on Blank canvas app – Create.

Step 5: Provide App name and Choose the Format. Click on Create.

Step 6: Click on Data.

Step 7: Search for Environment and Click on Environment Data Source.

Environment data source is Loading… and being added to your canvas app.

Environment data source has been added.

Step 8: Click on Insert and Click on Modern. Click on Button to add it on the Screen.

Note: Follow the below article to enable the Modern controls.

How to Enable the Modern Controls (Preview feature) in the Canvas Apps?

Step 9: Change button Text to Click here.

Step 10: On button OnSelect, wrote the below Power Fx formula to get the next Auto number value of the AccountNumber from the Account entity and storing the value in the NextAccountNumber Global Variable.

Set(
NextAccountNumber,
Environment.GetNextAutoNumberValue(
{
EntityName: “account”,
AttributeName: “accountnumber”
}
)
);

Step 11: Click on Alt key + click on Click here button.

Step 12: Click on the Variables and Click on NextAccountNumber -> View Record under the Global variables.

You can see the upcoming NextAccountNumber value.

In the Environment, I had the below Account records with Account Number as 1001 and 1002.

Like the same, you can call your Custom API or inbuilt APIs from the Canvas App using Environment keyword.

Hope you have followed all the steps and called the Dataverse Actions from the Canvas App.

Please like, share and follow my blog for more interesting articles.

Below are my earlier articles that you can have a look.

How to Enable Access to Microsoft Dataverse Actions (Preview feature) in the Power Apps?

How to Create an Instant Plugin in the Dataverse Environment?

How to Install the Microsoft Dataverse Accelerator in the Dataverse Environment?

What is Microsoft Dataverse Accelerator?

How to get the Logged in User Information in the Power Apps?

How to Install Power Platform Tools in Visual Studio Code?

How to Install the Apps from the Microsoft AppSource to your Dataverse Environment?

Microsoft Power Apps Maker Portal has a new look

Microsoft Power Apps Emulator (New Feature)

How to Enable the Dataverse Offline (Experimental Feature) in the Canvas Apps?

How to set the Authoring Version in the Canvas App?

New version of Dataverse Browser is available for Dataverse Plugin Debugging

Latest Free Practice Assessments for Microsoft Certifications

Download CRM 365 V9.X Tools using PowerShell

How to set the Refresh cadence for a Power Platform Environment?

Update forms and views (Preview feature) in Dataverse

How to connect to Microsoft Dataverse in Power Automate Flow using Service principal?

How to Enable Copilot (Preview) feature in Canvas Apps?

How to Debug a Dataverse Plugin without Installing the Profiler in the Plugin Registration Tool?

How to Enable the Licenses (Preview) feature for a Power Platform Environment?

How to Enable Maker Welcome Content (preview) in Power Apps Maker Portal?

How to Enable Managed Environments for a Dataverse Environment?

How to Enable the Modern Controls (Preview feature) in the Canvas Apps?

How to Enable 2023 Release Wave 1 updates in the Dataverse Environment?

How to Deploy Enterprise Applications in the new Dataverse Environment?

What is Preview, Experimental and Retired features in Canvas Apps?

How to Enable the New Power Fx Formula Bar in Power Apps Studio?

Writing Power Fx formulas with natural language

Power Fx Formula Columns in Dataverse

Generating Power Fx formulas from examples

How to Create Dynamics 365 Marketing 30 Days Trial Version Online?

How to disable Multi-Factor Authentication (MFA) on Dynamics 365 Login?

How to Create Microsoft Power Apps 30 days Online Trial Version and an Environment?

How to Update the URL of the Dynamics 365 CE Environment?

Power Apps US Government service URLs

How to Download Microsoft Power Platform Icons?

Microsoft Dataverse and Postman articles

Microsoft Dynamics 365 Online regions list

How to Install, Connect to Microsoft Dataverse and Use XrmToolBox?

How to take the Back-Up of Dynamics 365 Online environment?

How to restore Database Backup in Dynamics 365 Online?

How to recover a deleted Environment in Dynamics 365 CRM Online?


This was originally posted here.

Comments

*This post is locked for comments