We are excited to announce direct access to Dataverse actions in Power Fx formulas as an Experimental release. 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 object that authors can add to their app enables access to Dataverse actions. It is available with Power Apps release version 3.23022.
Without this feature, it has been common for authors to use Power Automate to call Dataverse. However, calling Dataverse directly from Power Fx provides significant performance benefits (and ease of use) and should be preferred for direct transactional reads and updates.
This feature update also allows authors to work with untyped object fields for both inputs and outputs, On the input side, for instance, many Dataverse actions require an untyped object as an argument. You can now pass these arguments in by using ParseJSON to convert a Power Fx record into an untyped object. On the output side, for actions that return untyped objects, you can simply ‘dot’ into returned objects’ properties. You will need to cast specific values for use in specific contexts for use in Power Apps (such as a label.)
Working with untyped fields is not restricted to Dataverse. It works for all types of connectors and provides basic ad-hoc dynamic schema support.
For documentation details on how to use this feature, please see the Power Apps documentation on how to work with Dataverse in Canvas Apps. See also the formula language features that enable working with untyped objects.