locked
CRM 2015: html page on ribbon button click RRS feed

  • Question

  • Hi

    I have a html webresource which is loaded on click of a ribbon button.

    On click of ribbon button, a script webresource is called, which further calls this html webresource using Xrm openWebResource.

    This html webresource has script tags (referencing js webresources) and references for css webresources

    It works fine in all browsers.

    But problem occurs in outlook.

    In outlook, when using openWebResource, the css and script webresources are not referenced properly. So the content on resulting html is incorrect and disoriented.

    However, if I use window.open instead of openWebResource, html loads properly. Problem, however, in outlook is, it asks for extra authentication when ribbon button is clicked through outlook client.

    Any help is appreciated.

    Thanks

    Wednesday, August 5, 2015 1:14 PM

All replies

  • Hello,

    Could you please provide header of your html that contains references?


    Dynamics CRM MVP
    My blog

    Wednesday, August 5, 2015 1:21 PM
    Moderator
  • <link href="custom_bootstrap.min.css" rel="stylesheet" type="text/css">
       
        <script src="ClientGlobalContext.js.aspx"></script>

        <script src="custom_metadata"></script>
        <script src="custom_jquery"></script>
        <script src="custom_/custom_/Scripts/bootstrap.min.js"></script>
        <script src="custom_FetchUtil.js"></script>
        <script src="custom_XrmServiceToolkit.js"></script>
        <script src="custom_mappingInvestors.js"></script>
        <script src="custom_json2"></script>

    I tried both relative url and absolute url.

    With absolute url it works perfect in browser, not in outlook

    With relative, it throws script error prompts

       
    • Edited by CRMDevlpr Wednesday, August 5, 2015 1:50 PM Incomplete info earlier
    Wednesday, August 5, 2015 1:40 PM
  • That's weird. I believe that the best way is to try to troubleshoot your code using following advices - http://crmentropy.blogspot.de/2015/04/debugging-dynamics-crm-for-outlook.html

    Dynamics CRM MVP
    My blog

    Wednesday, August 5, 2015 2:04 PM
    Moderator
  • thanks for link.

    I just noticed that js files are being referenced properly.

    its only css file thats not working.

    <link href="custom_bootstrap.min.css" rel="stylesheet" type="text/css">

    Wednesday, August 5, 2015 2:50 PM