Power FX Cheat Sheet for Commands in Model-Driven Apps

Fredrik Engseth
6 min readNov 5, 2022

Introduction

This post covers different Power FX snippets for customizing Commands in Model-Driven Apps. Power FX is the new approach for creating logic and visibility rules on Commands in Model-Driven Apps instead of using JavaScript and RibbonWorkbench.

The examples are meant to be a look-up guide or a cheat sheet to have a place with frequently used snippets. This is no complete cheat sheet list, but some snippets that came to mind at the time of writing and with the experience I got with PowerFX so far. Hope you find it useful.

Table of Content

  • Prerequisite
  • Setting up a Trial Environment
  • Notifications in a Model-Driven App
  • Create a Success Dialog and Notification Message
  • Create an Abort Dialog and Notification Message
  • Notification Banners
  • Visibility Formulas in Model-Driven App
  • Show or Hide Commands in a List View
  • Hide a Command Commands During Record Creation
  • Show Commands Based on Record Data
  • Patch Function (Update And Create)
  • Create a Related Record on the Current Record

--

--

Fredrik Engseth

Developer | Dynamics 365 | Power Platform | Azure | Personal development | Investments | ☕ https://www.buymeacoffee.com/fredrikengseth