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