locked
open pdf file on ribbon button click in mscrm 2011 RRS feed

  • Question

  • Hi,

    I want to open pdf file from button placed on Accont entity ribbon. Through HTML i tried below code and it worked fine

    <html>
    <body>
    <a href="file://C:\Users\asinha\Documents\UML.pdf">Link to a pdf</a>
    
    
    
    
    </body>
    </html>
    

    But i am not able to use the above code in mscrm 2011 button placed on form. It is giving error.

    Thanks,

    Abhishek


    Abhishek

    Friday, July 26, 2013 10:57 AM

Answers

  • That's because your link is to a local file. As soon as it's on the server, it's looking for the ULM.PDF file in the server's C:\ drive. You'll need to put the file on a web server and refer to it via a URL. The best way of doing this will depend on how IIS is configured, but it will either be in C:\inetpup\wwwroot or C:\Program Files\Microsoft Dynamics CRM\CRMWeb and then referring to the file as <a href="http:///UML.PDF">http://<server>/UML.PDF.
    • Marked as answer by Abhisinha17 Tuesday, March 31, 2015 2:36 AM
    Friday, July 26, 2013 11:39 AM

All replies

  • That's because your link is to a local file. As soon as it's on the server, it's looking for the ULM.PDF file in the server's C:\ drive. You'll need to put the file on a web server and refer to it via a URL. The best way of doing this will depend on how IIS is configured, but it will either be in C:\inetpup\wwwroot or C:\Program Files\Microsoft Dynamics CRM\CRMWeb and then referring to the file as <a href="http:///UML.PDF">http://<server>/UML.PDF.
    • Marked as answer by Abhisinha17 Tuesday, March 31, 2015 2:36 AM
    Friday, July 26, 2013 11:39 AM
  • Hi,

    I  am facing a similar issue and trying to access the same since two days.The document is on my server's c drive

    This is what i tried:

    I had placed the doc in the server C drive and i am trying to access it though the file://servername/foldername/documentname.

    <script>
    function myFunction() {
       window.open(file://servername/Demo.html);
    }"

    Can u Please help On how to achive the same.

    Or is there any alternative to get it

    Monday, March 23, 2015 5:46 AM