locked
crm 2011: main.asp ribbon does display when shown inside of iframe RRS feed

  • Question

  • We have a need to embed the main.aspx inside an iframe in another .html page.

    the main.aspx page does display perfectly, EXCEPT...

    unfortunately, the ribbon does not display at all, just an empty white space.

     

    Here is an example .html wrapper:

     

    <html>
    <head>

    <style>
    body{
       width:"100%";
       height:"100%";
       border:none;
       margin:none
    }

    iframe{
       width:"100%";
       height:"100%";
       border:none;
       margin:none
    }


    </style>

    </head>

    <body contentEditable="true" topMargin="0" botomMargin="0" leftMargin="0" rightMargin="0">

    <iframe id="crmmain" scrolling="no" src="..\..\main.aspx"></iframe>

    </body>
    </html>

    Is there some trick, like around cross scripting settings, needed to get the ribbon to display?

     

     

     


    Thanks, Robert
    Tuesday, August 30, 2011 2:26 PM

Answers

All replies

  • There are some other threads on this topic that seem to confirm that this is not possible.

    One other person created a Connect suggestion to allow this.

    https://connect.microsoft.com/dynamicssuggestions/feedback/details/685040/show-ribbon-when-form-loaded-in-iframe-using-url-addressable-forms-and-views

    Please vote for this.


    Thanks, Robert
    Tuesday, August 30, 2011 3:52 PM
  • Hi,

    To display another entity form in Iframe, you may refer to the following blog post: http://blogs.microsoft.co.il/blogs/rdt/archive/2011/02/07/crm-2011-how-to-set-iframe-control-content-dynamically.aspx


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, August 30, 2011 3:57 PM
  • Understood, but that is not the requirement here.

    the need is to display the top-level main.aspx inside an iframe of another application .html.

    When doing so, the ribbon does not display.

     

    Thanks,

    Robert

     


    Thanks, Robert
    Tuesday, August 30, 2011 4:16 PM
  • Hi,

    What do you mean by top level? do you mean, ar eyou opening the CRM inside an IFrame in html page?


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, August 30, 2011 4:30 PM
  • exactly correct :)

    as shown in the code snippit at top.

     


    Thanks, Robert
    Tuesday, August 30, 2011 5:00 PM
  • Hi,
    Why do not use the absolue Url of Dynamics CRM 2011 or if you will pass the paramters to webresource or Html page then you wiill be able construct the absolute Url dynamically. i.e.
    html>
    

    < head>
    <style>
    body{
    width:"100%";
    height:"100%";
    border:none;
    margin:none
    }
    iframe{
    width:"100%";
    height:"100%";
    border:none;
    margin:none
    }

    < /style>
    </head>
    <body contentEditable="true" topMargin="0" botomMargin="0" leftMargin="0" rightMargin="0">
    <iframe id="crmmain" scrolling="no" src="http://crmserver:5555/orgname/main.aspx"></iframe>
    </body>
    < /html>

    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, August 30, 2011 5:48 PM
  • Great question.  That's the problem of me asking the pointed question without context. :)

    The real requirement is that we need our CTI agent to open the main.aspx page, go to Contacts list, stuff in the callers phone# into the quicksearch field, then execute the quick search.

    main.aspx does not have any support for passing in quicksearch data like this.

    And, we do NOT want to write a custom UI, as we want the user to be within the full context of the full CRM main UI.

    So, the thought was to just put a light-weight .html page wrapper around main.aspx, load it in an iframe, then write a little javascript to navigate to Contacts, put the phone# into quicksearch and do the search.

    The jscript is easy enough, but without the ribbons displaying, the approach will not work.

     


    Thanks, Robert
    Tuesday, August 30, 2011 6:45 PM
  • Hi,

    Few questions:

    1. Can not you use absolute Url for CRM?

    2. Does the CRM popup screen open by CTI? or are you using the CTI softphone inside CRM?

     


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, August 30, 2011 11:55 PM
  • Well, why don't you use Customer Care Accelerator here. That accelerator is for the very purpose and setting up CRM or any crm form is a few clicks away. no real need for programming.
    Ayaz Ahmad CRM Solutions Architect | http://ayazahmad.wordpress.com
    Wednesday, August 31, 2011 12:51 AM
    Moderator
  • I voted for your suggestion Robert, I hope it helps.

    Regards, Donna

    Saturday, September 3, 2011 1:12 PM
  • update
    Saturday, September 3, 2011 2:32 PM
  • Hi everyone.

    I found a solution for this and wanted to share with the community as I've been hitting the wall for so many days with this and I think it's worth sharing.

    The solution is to have an additional web page with an IFRAME targeting the web page with the HTML5 OBJECT (html5's iframe substitute) targeting the crm view.

    Quick pseudocode sample:

    first_page.html:

    <html>
    <iframe src="second_page.html"/>
    </html>

    second_page.html:

    <html>
    <object data="http://<crm view url>" type="text/html" />
    </html>

    In my case both pages are uploaded as html webresources to the crm and works like a charm. However, there's a little bug: when you click on the primary attribute of the record on the grid to open it a JS error occurs. However, if you open it by just double clicking the record the error does not happen. It's a minor bug but worths mentioning.

    Happy crming :)


    • Proposed as answer by dnicolau Wednesday, July 11, 2012 8:53 AM
    • Edited by dnicolau Wednesday, July 11, 2012 10:37 AM
    Wednesday, July 11, 2012 8:53 AM