locked
Mscrm.CrmDialog - set style (margin, etc.) RRS feed

  • Question

  • Hi,

    I want to show a simple view in a Mscrm.CrmDialog.

    var dialogwindow = new Mscrm.CrmDialog(Mscrm.CrmUri.create(<URL_TO_VIEW>), window, width, height, null);
    dialogwindow.show();

    This works without any problems but as the CrmDialog has already a predefined style, there is for example the 'X' to close the dialog which overlaps the view. This doesn't look very good. As a workaround I tried to create a simple webresource with an iframe which has a margin and some style set and which displays the view.

    <iframe name="resultFrame" style="border:0; ; top:40px; left:0; right:0; bottom:0; width:100%; height:calc(100% - 40px)"></iframe>

    The problem now is, that opening CRM-records by clicking at them in the view is broken (I guess because of cross-site scripting prevention?!?). Is there any other solution? Are there any parameters for the CrmDialog which could do the trick? Or any other possibility to set a margin/ padding inside the CrmDialog?

    Any hints are welcome,

    kind regards Peter

    Monday, July 20, 2015 3:32 PM