CRM 2011: Add javascript library to ribbon button

Say you want to use CrmRestKit or any other library from a ribbon button click, within an associated view. You can add the library to the parent entity form or to the associated entity, it won’t work.

As I found here, what you need to do is, in the command of the button click, using ribbon workbench for example (or directly in the xml), as follows.
The main thing here is to add the required libraries, and assign them isNaN as function name.



<JavaScriptFunction Library="$webresource:new_json2.js" FunctionName="isNaN" />
<JavaScriptFunction Library="$" FunctionName="isNaN" />
<JavaScriptFunction Library="$webresource:new_task_formscripts.js" FunctionName="Task_Update">
<CrmParameter Value="FirstSelectedItemId"/>

Leave a Reply

Your email address will not be published. Required fields are marked *