[SOLVED] Report PDF Generation Issue in Dynamic 365 V9.0 using JavaScript
Introduction:
Implementation:
Step 1: Below shown is the code used in Dynamics 365 v8.2
Step 2: After the upgrade to Dynamics 35 v9.0 the below error message shown while debugging
Hope this helped!
One of my clients had a requirement in Dynamics CRM v8.2 to simplify the report generation process. I added a button on the Quote entity which on click runs a report, captures its contents using JavaScript, converts it to PDF and attaches the PDF to an Email Record.
Recently after the upgrade to Dynamics 365 v9.0 the pdf generated was corrupted. To tackle this i had to make some changes to the code. Lets quickly walk through it.
Step 1: Below shown is the code used in Dynamics 365 v8.2
Step 2: After the upgrade to Dynamics 35 v9.0 the below error message shown while debugging
On further research we found the URL that the url has been changed. To fix it, just change the URL in the code to the following
var pth = Xrm.Page.context.getClientUrl() + "/CRMReports/rsviewer/ReportViewer.aspx";
Hope this helped!
Comments
Post a Comment