Hi All,
I have a standard report that I want to run from a ribbon button.
This report happily runs on an amount of selected records when I go through the normal 'Run Report' button, however all the walkthroughs and sample code (such as http://msdn.microsoft.com/en-us/library/gg328483.aspx) only allow 1 record I to be passed.
Attempting to pass more than 1 GUID produces the following error:
'Expected type of attribute value System.Guid. Exception raised Guid should contain 32 digits with 4 dashes xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
The js code I have for calling the report is as follow:
function openReport(selectedPaymentIds){ debugger; var rdlName = "Custom Payment Invoice.rdl"; var reportGuid = "227B0184-F2D7-E211-A1CD-00155D89DC0F"; var entityGuid = selectedPaymentIds; var entityType = "10006"; var orgUrl = Xrm.Page.context.getServerUrl(); var link = orgUrl + "/crmreports/viewer/viewer.aspx?action= "+encodeURIComponent("run")+"&context=records&helpID=" + encodeURIComponent(rdlName) + "&id={" + encodeURIComponent(reportGuid) + "}&records=" + encodeURIComponent(entityGuid) + "&recordstype=" + encodeURIComponent(entityType); openStdDlg(link, null, 800, 600, true, false, null); }
Have I tried to pass in the record Id's wrong? I'd appreciate some insight :)
Thanks!