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 / Model-driven app: Java...
Power Apps
Unanswered

Model-driven app: Javascript refresh of command bar

(1) ShareShare
ReportReport
Posted on by 66

Hi all

 

I'm relatively new to writing Javascript, I generally have it doing what I want but at the end need it to refresh the users command bar so the visibility conditions on the custom buttons are applied.

 

I've tried things like:

 

formContext.data.refresh(true);
formContext.data.entity.save();
formContext.ui.refreshRibbon(true);
 
But do not seem to be getting it to work. Any suggestions?
 
Thanks in advance
Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @Treebys - have you considered using Ribbon Workbench to achieve this?

     

    https://www.youtube.com/watch?v=he690moJnlA

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Treebys Ribbon workbench had to be used many years ago when it was not possible any other way than XRMToolBox and Ribbon Workbench.
    You may now edit the command bar using out-of-the box functionality in Power Platform.

    You may also now try Power Fx as well for custom command bar Actions, (or still continue to use Javascript).

    Check the below for more info:
    Read here for how to edit the command bar with out of the box functionality. 

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard