Dynamics CRM Homepage Ribbon button references multiple JavaScript resources

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.