Skip to main content

Notifications

Dynamics 365 general forum
Answered

Weird behaviour when using Power FX commands in command bar of Dynamics Model Driven App

Posted on by 15

Hi All!

I'm currently doing my first steps with using Power FX in the command bar of a form of a Dynamics 365 Model Driven App. The problem is, that my app behaves completely different from the description in tutorials or the MS documentation (I'm referring to this: https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/commanding-use-powerfx)

1.) I'm trying to set the visibility dynamically through a formula, but even when I'm setting the FX command just to "false" the button doesn't dissapear.

2.) When I use very simple commands, just like Launch, it returns a strange error message just saying that something went wrong without any proper reason (see screenshots).

pastedimage1669708735744v1.png

pastedimage1669708760336v2.png

When I use the same or similiar commands in my own test canvas app everything works as expected. The weird behaviour only happens in the Dynamics App.
Can anyone point me in the right direction?

  • David Service Profile Picture
    David Service 35 on at
    RE: Weird behaviour when using Power FX commands in command bar of Dynamics Model Driven App

    Hi Everyone,

    I've had *exactly* the same problem. I've tried publishing multiple times, creating new apps with the same tables, new apps with different tables and even deleting the entire app (including component library and site map) and starting again but using PowerFx just isn't working for me.

    I'm going to implement the logic and the button using JavaScript for now as I need to move this project on but I'm concerned I may have something set up incorrectly in my environment for PowerFx to not work properly - are there any other pointers anyone might have on this?

    Thanks!

  • Zuteilunsgreif Profile Picture
    Zuteilunsgreif 15 on at
    RE: Weird behaviour when using Power FX commands in command bar of Dynamics Model Driven App

    I can't blieve it that multiple publishing really did the trick!!

    Thanks for your help!

    That's a very annoying problem.

  • Verified answer
    Steve Zhao2 Profile Picture
    Steve Zhao2 on at
    RE: Weird behaviour when using Power FX commands in command bar of Dynamics Model Driven App

    Hi,

    I create a custom button on my custom entity and its setting is like this:

    pastedimage1669778509874v1.png

    When I first open the app to test it, I get the same error with yours.

    And then I publish it again, and then reopen the page in inprivate window, it works:

    Don't select any rows:

    pastedimage1669778707345v2.png

    Select rows:

    pastedimage1669778725873v3.png

    Click the button and then Bing is opened:

    pastedimage1669778785745v4.png

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,435 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,317 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans