Search code examples
javascriptxmldynamics-crm-2011ribbon

<JavaScriptFunction> in <RibbonDiffXml> not working


I created a custom button in the ribbon menua bar in CRM 2011 and now I want to call a webresource js. This is what I have now:

<Actions>
    <JavaScriptFunction FunctionName="functionName"
       Library="$webresource:opportunity_ribbon.js" />
</Actions>

But when I click the button, no response at all. Any idea what's wrong?

Update: The problem seems to be the js I'm calling. The line

locAddActTo(4207);

fails and its says the value of locAddActTo is null. Any ideas about how to fix this?


Solution

  • It works after I changed locAddActTo to locAddRelatedTo, but I don't know why is it. Anyone?