The development of the Ribbon in the CRM development is a more important link, many of the customized functions need to use the Ribbon area, CRM2013 name has been changed to command bar, but from the old version of the people are still accustomed to call him the Ribbon.
Ribbon Add button is often associated with a series of webresources,javascript is one of them, the general ribbon development is based on form, to use home or sub-grid not too much. In the development of the form, a JavaScript action refers to a JS resource, even if the method has to invoke another common JS method (such as xrmservicetoolkit.js), only need to add universal JS to the script library of the form, But if it's homepage, it won't work, and we need to do it in a different way.
<Actions> <javascriptfunction functionname= "Doapprove" library= "$webresource: New_task" > < Crmparameter value= "Selectedcontrolselecteditemids"/> </JavaScriptFunction> < Javascriptfunction library= "$webresource: New_global.js" functionname= "IsNaN"/> </Actions>
Additional function, set the functionname to isNaN.
The call to action resolves, and another use of JavaScript funtion is the Custom JavaScript rule in enable rule, which in 2013 enable rule and display After the rule implements the same hidden and displayed effects, custom rule plays a big role in customizing the development and can be hidden by scripting the easy control of the Ribbon display. The following method of referencing the action is not a viable option.
<EnableRules> <enablerule id= "New.activitypointer.EnableRule0.EnableRule" > <customrule Functionname= "approvevisible" library= "$webresource: New_task" default= "true" invertresult= "false"/> < Customrule library= "$webresource: New_global.js" functionname= "IsNaN" default= "true" invertresult= "false"/> </EnableRule> </EnableRules>
Reference article http://madcomputerist.blogspot.co.uk/2012/06/referencing-multiple-javascript.html
Dynamics CRM Homepage Ribbon button references multiple JavaScript resources