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 / MsCrm.GlobalTab button...
Power Apps
Unanswered

MsCrm.GlobalTab button and CrmParameters

(0) ShareShare
ReportReport
Posted on by

Hi all,

I’m trying to launch a javascript function from a button in the MSCrm.GlobalTab (A button that is between the "?" icon and the User Account icon). I have used the Ribbon Workbench to setup the button and the command. I’m running a custom javascript function from there.

 

My problem is that when my function executes, any CrmParameter I try is not populated (they are null). I’m trying to get access to the CrmParameter PrimaryControl. When I try a test String parameter that comes through OK. I’ve also tried to get access to Xrm.Utility.getPageContext() object – also null when coming from the MsCrm.GlobalTab button.

 

I’ve called the same function from buttons placed in other areas (Entity Form/Grid etc) just to check I’m not doing something really crazy and they work fine.

 

So why is it that I can’t get a CrmParameter such as the PrimaryControl? I’m trying to get access to some context information that is shown in the rest of the page (the Model-Driven app form that is currently on show to the user).

 

Thanks

I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    I believe you can't get any parameter passed because this Command Bar doesn't have any context. What specific information are you looking for?

  • cchannon Profile Picture
    4,702 Moderator on at

    "why" the nested contexts of a model driven app don't keep the primary control / formcontext at the top level we will probably never know. But even if you can figure out a workaround here I think you should reconsider the approach.

     

    Ribbon buttons have always been in that gray area where MSFT doesn't force us away from them but hasn't encouraged it. Probably because they are peppered with caveats like this one.

     

    But as of Wave 1 this year, we have a usable, supported, solution-aware alternative: Commands. To the user experience, these are the same as ribbon buttons, but Commands are now finally first-class solution components, including an in-app editing experience instead of relying on the Ribbon Workbench.

     

    The bad news is that Commands do not have a Global command bar option, so there is no way to use these where where you're trying to put this button. This might change in the future, but I haven't seen anything about it in the roadmaps. But MUCH more important than the feature gap here is that ribbon buttons are clearly on their way out, so even if you can figure out a fix for this you're heading down a highly specialized, little-used track on a feature that is guaranteed to be deprecated sooner or later. That is not a good way to head, given how fast the product moves these days.

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 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard