Here we are with another post after a very long hiatus! It's been quite tough to find time to put these blog posts together, even though we are all stuck inside with nowhere to go right now. At the time of writing this, it is currently -45°C in lovely Alberta, just cold enough for us Canadians to put on a sweater.
This post was actually a biproduct of an issue we came across for a client of ours. Recently we utilized the Microsoft functionality of a "Partial Copy" from the Development environment into the Production environment. We wanted all of our customizations (and to avoid the headaches of migrating solutions) without any of the associated testing data. In theory this would have been a fantastic approach, however, as Microsoft mentions, the partial copy will not bring over ANY data.
This leads us to the PDF Generation functionality recently updated by Microsoft that allows us to use the Export to PDF button to ad-hoc generate PDFs out of the Dynamics environment. In our case, we were trying to set it up in the new Production instance and we received a generic error:
Since this did not provide us with much to go off of, we used our handy kit of developer tools (AKA Developer Tools in Chrome) which lead us to see that the system was trying to reference a specific record in the Dynamics environment from the "PDF Settings" table. Upon further investigation, this table existed but did not contain any records. After verifying with DEV (where the Export to PDF functionality was working) we were able to see that indeed there was a single record in the table that contained all of the settings for the PDF Generation process.
The solution to our problem was simple - the record needed to exist in the Production environment. This made total sense as we ran a partial copy, and even though this is required by a Microsoft process to work, of course it didn't come over. Using the Data Transporter tool in the XrmToolbox, we were able to migrate the single record from that table over to Production from our Development environment and everything worked great! A nice feature of this was since the settings were all stored in that single record, all of the entities selected in the Development environment for the PDF Generation were automatically selected and enabled in the Production environment - no additional configuration required.
This does make me wonder what other records do not come across in a partial copy that you would think would, and how that affects the environments going forward. Hopefully this helps diagnose those generic errors and gets you generating those PDFs once more!
Comments