One can use Javascript functions (or URL) to obtain the Selected Entity type, Selected Entity Count and Selected Item GUIDs from the HomePage Grid of MS Dynamics CRM 2011
Lets assume you are on the Account Entity HomePage Grid of your MS Dynamics CRM 2011 Server. (Entity can be any entity, even custom entities).
Suppose you have a Custom Button in the corresponding Ribbon, labelled myButton, for example.
On clicking the Button, you want to call a javascript Function. Also you want to pass information of the Selected records in the Grid to the function.
This can be done by using CRM parameter in the customizations.xml file which you get after exporting a solution containing – Application Ribbons.
Browse down to tag of your custom button. Under it find tag. Under it you can have tag or tag.
By using CRM parameter as shown below you can pass information from the Grid – such as Number of records Selected/Unselected, GUIDs of Selected records, Total Number of Records in the Grid and much more.
** A Screen shot is provided at the end.
***
YOUR JAVASCRIPT FUNCTION NEEDS TO HAVE AS MANY ARGUMENTS AS THE NUMBER OF CRM PARAMETERS.
***
MY JAVASCRIPT FUNCTION : function ShowSelectedItems( selectedEntityCount , selectedEntityName , idList ) { alert( idList + "\nRECORD COUNT - " + selectedEntityCount + "\nENTITY TYPE - " + selectedEntityName ); }