Open document on click of button in D365 CRM using JavaScript
In this blog we will see how we can open a PDF document on click of button from a record in CRM
Let say we have User Guide button on Lead Entity and on click of User Guide button, a PDF document which is User Guide document should be open in next tab.

Solution
- Create a solution and add lead entity only.
Then open the same solution in XRM Toolbox – Ribbon Workbench


var openUserGuide = { //openUserGuide.userGuide userGuide: function () { "use strict"; Xrm.Navigation.openUrl("https://sinerleak.sharepoint.com/:b:/s/SingerLewak/EaQO2OWjWA1BnHFCCENV-6EBDkILbg3EfPSFLEu-KCeraw?e=ofVyVB"); } }
4. Add action to command and Publish the solution from XRM Toolbox

Output –

Related posts:
How to add an Entity and fields in Global Search On Dynamics 365 CRM
How to create a SharePoint site and enable Server-Based SharePoint Integration for Document Manageme...
Posting Restriction in Business Central for different users for Purchase and Sales documents
Quality Management Process in Dynamics 365 Supply Chain Management - Part 2