1) Put a button on the Custom entity
Grid Toolbar by modifying the ISV.Config.xml file.
2) Make sure you set the PassParams attribut to '1' and set the URL to a web page you create.
3) On the OnLoad function of the web page use the windows.dialogArguments method and loop through to extract the entityId's of all the records that were selected.
function window.onload()
{
if(window.dialogArguments != null)
{
var arr = new Array(window.dialogArguments.length -1);
arr = window.dialogArguments;
for(i=0; i<arr.length; i++)
{
alert(arr[i]);
{
}
else
{
alert('No Records Selected');
}
}
}
Here is a link as an example
http://nishantrana.wordpress.com/2007/10/01/using-isvconfig-to-access-field-values-in-crm/In case you want to perform some processing in javascript and don't want to open a new page. follow this link
http://blog.customereffective.com/blog/2009/08/fun-with-the-crm-grid-object.htmli hope it helps u