Open document on click of button in D365 CRM using JavaScript

Deal Score0
Deal Score0

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.

image

Solution

  1. Create a solution and add lead entity only.

Then open the same solution in XRM Toolbox – Ribbon Workbench

image
2. Create/Upload user guide document on SharePoint and Copy Document URL by clicking Share Document icon.
image
3. Create a WebResource with below code
 var openUserGuide =
{
   //openUserGuide.userGuide
userGuide: function () {
    "use strict";
    Xrm.Navigation.openUrl("https://sinerleak.sharepoint.com/:b:/s/SingerLewak/EaQO2OWjWA1BnHFCCENV-6EBDkILbg3EfPSFLEu-KCeraw?e=ofVyVB");
    }
} 
  1. Add action to command and Publish the solution from XRM Toolbox
    image

    Output –

    image

    [vc_row][vc_column][vc_cta h2=”We are happy to help!” css=”.vc_custom_1678760946443{margin-top: 10px !important;margin-bottom: 10px !important;}”]If you need technical support for your projects simply reach us at contact@bizsoft.com.sg or fill out the form below and we’ll be in touch shortly.[/vc_cta][/vc_column][/vc_row][vc_row][vc_column][dt_contact_form fields=”name,email,telephone,message” required=”name,email,message” terms=”y” terms_msg=”QnklMjB1c2luZyUyMHRoaXMlMjBmb3JtJTIweW91JTIwYWdyZWUlMjB3aXRoJTIwdGhlJTIwc3RvcmFnZSUyMGFuZCUyMGhhbmRsaW5nJTIwb2YlMjB5b3VyJTIwZGF0YSUyMGJ5JTIwdGhpcyUyMHdlYnNpdGUu”][/vc_column][/vc_row]

We will be happy to hear your thoughts

Leave a reply

[mailpoet_form id="1"]
Bizsoft
Logo
Compare items
  • Cameras (0)
  • Phones (0)
Compare