Here ,I will try to explain how to retrieve all selected grid records in Dynamics CRM into a custom page
First of all ,we need to create a custom button on desired entity grid which will open the custom page.
var sOtc=document.all['crmGrid'].GetParameter(‘otc’)
var sUrl = ‘/ISV/SolutionFolder/Solution.html?crmOrgName=’+ORG_UNIQUE_NAME + ‘&crmOtc=’+sOtc+’&crmUserLangCode=’+USER_LANGUAGE_CODE;
var sWin = window.open(sUrl,”,’height=650,width=750,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,modal=yes’);
“
Client=”Web”>
So,you need to update your ISV as mentioned in Dynamics CRM SDK.
crmSelectedRecords function will called on custom page.
sOtc is the parameter to determine the objecttypecode of the entity.(I like to pass this parameter to build dynamic solutions )
sUrl is the custom pages url to be called by button click
So,we need to create our custom page which will display the selected records and placed under the /ISV/SolutionFolder/.
Let’s create a HTML page and name it as “Solution.html”.
Copy and paste the complete code into Solution.html