Download CRM 2011 Visual Ribbon Editor tool from the following codeplex URL.
http://crmvisualribbonedit.codeplex.com/
1. Establish CRM connection
2. Select the entity to customize and click ‘OK’ to load entity ribbon customizations
3. Select ‘Homepage’ from Ribbon type dropdown list.
4. Select any ribbon button and click on ‘New Button’
5. Update the Ribbon button options in ‘Details’ tab.
6. Update the JavaScript options in ‘Action’ tab.
a. Add JavaScript function
Function Name: JavaScript function calling in ribbon button click
Library: JavaScript web resource name
b. Add CRM parameter and select the value as ‘SelectedControlSelectedItemReferences’
JavaScript code to get the selected record
function GetContacts(selectedEntityRefs) { alert("Id: " + selectedEntityRefs[0].Id + "\n Name: " + selectedEntityRefs[0].Name + "\n TypeCode: " + selectedEntityRefs[0].TypeCode + "\n TypeName: " + selectedEntityRefs[0].TypeName); }
Pingback: Personalizar Dynamics CRM 2015 Online con Javascript | Mi blog técnico