
Announcements
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 :
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!
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!