web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Command Bar Buttons - ...
Power Apps
Unanswered

Command Bar Buttons - PowerFx

(0) ShareShare
ReportReport
Posted on by 172

Hi There,

 

I'm trying to create a command bar button in a Model Driven app using PowerFx using this article as my source : https://www.matthewdevaney.com/customize-the-command-bar-in-a-power-apps-model-driven-app/

 

All seems to go well when creating and customising the button, but when I run the app and click the button I get this error : 

Serviced2000_0-1678155149861.png

Or something similar. I found a question on the D365 Community (https://community.dynamics.com/365/f/dynamics-365-general-forum/472762/weird-behaviour-when-using-power-fx-commands-in-command-bar-of-dynamics-model-driven-app/1323585) where someone had the same thing but the solution there just isn't working for me. 

 

I'd like to use PowerFx as I understand it a lot better than JavaScript but I suspect I'll need to use JavaScript to get this delivered. I'm concerned I might be missing something in my config or environment settings though. 

 

Can anyone shed any light on this?

 

Thanks!

Categories:
I have the same question (0)
  • Serviced2000 Profile Picture
    172 on at

    Ok, so a bit of an update on this one. After trying out a few more things I built a small app in a completely different tenancy and the PowerFx formula I had been trying all day (Notify("Button pressed")) worked perfectly. So I went back to the original tenancy but into a different environment and repeated the process - that worked perfectly too. I then went back to the *original* environment and created a new solution and app - that worked without issue.

     

    Finally, I went back to the original app in the original solution in the original environment and tenancy and repeated the same steps I tried all day before writing the post above. The app worked as expected and I was even able to extend that to add a Patch statement that was the ultimate goal in the first place.

     

    I'm sure this is operator error, but there seems to be a weird inconsistency between different apps, solutions, environments and tenancies. If anyone can shed any light on what I might be doing wrong that would be very much appreciated.

     

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard