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

    We are happy to help!

    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.

    [dt_contact_form fields=”name,email,telephone,message” required=”name,email,message” terms=”y” terms_msg=”QnklMjB1c2luZyUyMHRoaXMlMjBmb3JtJTIweW91JTIwYWdyZWUlMjB3aXRoJTIwdGhlJTIwc3RvcmFnZSUyMGFuZCUyMGhhbmRsaW5nJTIwb2YlMjB5b3VyJTIwZGF0YSUyMGJ5JTIwdGhpcyUyMHdlYnNpdGUu”]

We will be happy to hear your thoughts

Leave a Reply

Looking to grow your business?
We can help.

Unlock Weekly Insights, Tools & Special Offers Before Everyone Else! We promise we’ll never spam. Take a look at our Privacy Policy for more details.

Bizsoft
Logo
Compare items
  • Cameras (0)
  • Phones (0)
Compare