D365 Export to PDF
Having Word templates is great, but directly creating PDF files is even better.
We already presented you a tutorial, how you could create this with code: Dataverse Custom API Preview (Dynamics 365 CDS).
In this trick, I show you, how you can enable this feature for your users.
Open Sales Hub App
The configuration is done in the Sales Hub App, but can also be done within any other app:
If you have opened it in the Sales Hub App, switch to the "App Settings" area.
When you have opened the "App Settings", you will find the settings under "Settings" -> "Overview" -> "Convert to PDF".
You can now search for tables and enable them for PDF creation:
View it in action
As I enabled PDF creation for contacts, I'll open a contact and see, that there is a new button:
If you click on it, the PDF generation dialog is opened. You'll see all related Word templates and a preview of the generated document. In the command bar, you'll have several options:
- Download: Simply downloads the file
- Email: Creates a new CRM email and will attach the PDF
- Save to Dynamics: Add the created PDF as note attachment
- Save to SharePoint: Add the created PDF to SharePoint document location associated with the current record.
The SharePoint option is only available, if SharePoint integration is enabled for the current table. If SharePoint integration is enabled, the "Save to Dynamics" option will not be available.
If you didn't create a Word template yet, you'll receive an error message: