3

I'm not so new in CRM 2011, but I faced with one big problem... I found some solution on net that makes some scoring/ranking system in CRM. I was completely confused when I saw star in top status bar, above ribbon buttons bar, next to username on right corner of screen.

enter image description here

When I click on this button, I open div with some information about users, and scores they have.

  1. Where I can put Java Script function (jQuery for example) that can be executed globally? How to call that function, what event to catch? I need this button/function be active on all pages in CRM like this one.
  2. What is id of that place in top bar? I need it to put this button from my script.
shytikov
  • 9,155
  • 8
  • 56
  • 103
CoYoTe
  • 95
  • 1
  • 7
  • Can you post a link? Sounds like an unsupport customisation – James Wood Oct 09 '12 at 10:33
  • Are you asking for help using a solution you have downloaded and installed, or help in reproducing something similar to an example you have seen? (in which case how about linking to the actual example web page?) – AdamV Oct 09 '12 at 10:47
  • I need to make something similar to this. @James Wood: I think I get it from store, not sure ;-) – CoYoTe Oct 09 '12 at 11:01
  • 1
    Looks unsupported to me. – James Wood Oct 09 '12 at 11:05
  • 1
    Why don't you create an application ribbon button that would show up in all homepage/grid/subgrid areas? This could call a custom webresource that shows the user information you want. – Peter Majeed Oct 09 '12 at 13:41
  • It appears this is the solution in question. http://www.wave-access.com/Public_en/ms_crm_gamification_product.aspx – Adam Mills Aug 08 '13 at 13:50

1 Answers1

6

The CRM solution you appear to be talking about is this

http://www.wave-access.com/Public_en/ms_crm_gamification_product.aspx

This is obviously unsupported. However they achieve it by adding a dummy button to the ribbon, specifically the Jewel Menu. This button command is linked to a JS function in a webresource. The button is always hidden but the JS file is always loaded.

It should be noted that your JS is loaded into Main.aspx (the root document) From there its a matter of injecting HTML elements or javascript into the desired frame. (Nav or Content)

Here is the RibbonDiffXML to add to a solution.

<RibbonDiffXml>
<CustomActions>
  <CustomAction Id="Dummy.CustomAction" Location="Mscrm.Jewel.Controls1._children" Sequence="41">
    <CommandUIDefinition>
      <Button Id="Dummy" Command="Dummy.Command" Sequence="50" ToolTipTitle="$LocLabels:Dummy.LabelText" LabelText="$LocLabels:Dummy.LabelText" ToolTipDescription="$LocLabels:Dummy.Description" TemplateAlias="isv" />
    </CommandUIDefinition>
  </CustomAction>
</CustomActions>
<Templates>
  <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
  <CommandDefinition Id="Dummy.Command">
    <EnableRules />
    <DisplayRules>
      <DisplayRule Id="Dummy.Command.DisplayRule.PageRule" />
    </DisplayRules>
    <Actions>
      <JavaScriptFunction Library="$webresource:MyGlobal.js" FunctionName="Anything" />
    </Actions>
  </CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
  <TabDisplayRules />
  <DisplayRules>
    <DisplayRule Id="Dummy.Command.DisplayRule.PageRule">
      <PageRule Address="aaaa" />
    </DisplayRule>
  </DisplayRules>
  <EnableRules />
</RuleDefinitions>
<LocLabels>
  <LocLabel Id="Dummy.Description">
    <Titles>
      <Title languagecode="1033" description="Description" />
    </Titles>
  </LocLabel>
  <LocLabel Id="Dummy.LabelText">
    <Titles>
      <Title languagecode="1033" description="Description" />
    </Titles>
  </LocLabel>
</LocLabels>

This goes in the root ImportExportXml element of the customizations.xml You may also need to add Application Ribbons as a solution component via the UI

Adam Mills
  • 7,719
  • 3
  • 31
  • 47
  • I tried to follow your suggestion but for me it is not working, the Javascript file is not loaded when the button is hidden. I had to add the button to the SubGrid/Grid/Dashboard section, but that still leave me the Settings area. And I want to hide the button as well. Do you have any more idea? – chinh nguyen van Jul 11 '14 at 04:40
  • The Jewel menu is not available anymore in MS CRM 2013: http://msdn.microsoft.com/en-us/library/gg309420.aspx However according to the website that CRM Gamification Tool is available for MS CRM 2013 as well. Do you know how they still placing button there? – shytikov Sep 11 '14 at 10:24