locked
dynamics crm 2015-2016 online & on-premise Opportunity form Insert web resource bug RRS feed

  • Question

  • I see there is issue while inserting web resource into Opportunity form as shown below. I added one web resource "CustomerNO" into Opportunity Form Summary tab under Currency field as shown below and I did configured the field to display in 1 line. The we resource has only one line text "test" in it. but some how that web resource doesn't stay in one row..i mean see below it take 6 rows by default as shown below. the form ignores the Number of rows that we configure into web resource field property as shown below.

    can some one try and see if this is a Bug into system?? IE display this incorrect, but chrome seems to display this in one line.

    I tried this with CRM 2015 On_premise and 2016 on-premise, but behaving similar. I also tried few other web resources, but having same trouble.

    Thursday, July 14, 2016 7:34 PM

Answers

  • can any assistance on this issue?? I have this issue in IE & Edge and have tried few pc and couple users....but no luck. This is stange..because this used to work fine in CRM 2015 fresh installation ///....must have something changed on or after update 0.1
    • Marked as answer by Nicksoft2011 Monday, July 25, 2016 12:23 PM
    Thursday, July 21, 2016 7:33 PM
  • Hope this helps.

    just pass the field name of the web resource in when calling the method from the form onload.

    // Override IFrame styles

    function iframeStyleInline(strIFrameName) {

    // This is needed to display a web resource (iframe) on one line of a form. Without setting the height of the iframe

    // element the iframe takes up multiple lines on the rendered form regardless of the settings you apply in the form editor.

    // Get the IFrame object reference.

    var iFrame = Xrm.Page.getControl(strIFrameName).getObject();

    // Get the style attribute.

    var atts = iFrame.attributes.getNamedItem("style").value;

    // variable for the new style.

    var newStyle;

    // Check if the style attribute exists and if not create it

    if (atts === null) {

    newStyle = "height: 24px;";

    }

    else {

    // Append the additional style.

    newStyle = atts + " height: 24px;";

    }

    // Assign the amended style value back to the IFrame object reference. If the attribute doesn't already exist

    // setAttribute creates it. If it does already exist then the attribute value is updated.

    iFrame.setAttribute("style", newStyle);

    }

    • Marked as answer by Nicksoft2011 Monday, July 25, 2016 12:22 PM
    Friday, July 22, 2016 12:48 PM

All replies

  • can any assistance on this issue?? I have this issue in IE & Edge and have tried few pc and couple users....but no luck. This is stange..because this used to work fine in CRM 2015 fresh installation ///....must have something changed on or after update 0.1
    • Marked as answer by Nicksoft2011 Monday, July 25, 2016 12:23 PM
    Thursday, July 21, 2016 7:33 PM
  • Hope this helps.

    just pass the field name of the web resource in when calling the method from the form onload.

    // Override IFrame styles

    function iframeStyleInline(strIFrameName) {

    // This is needed to display a web resource (iframe) on one line of a form. Without setting the height of the iframe

    // element the iframe takes up multiple lines on the rendered form regardless of the settings you apply in the form editor.

    // Get the IFrame object reference.

    var iFrame = Xrm.Page.getControl(strIFrameName).getObject();

    // Get the style attribute.

    var atts = iFrame.attributes.getNamedItem("style").value;

    // variable for the new style.

    var newStyle;

    // Check if the style attribute exists and if not create it

    if (atts === null) {

    newStyle = "height: 24px;";

    }

    else {

    // Append the additional style.

    newStyle = atts + " height: 24px;";

    }

    // Assign the amended style value back to the IFrame object reference. If the attribute doesn't already exist

    // setAttribute creates it. If it does already exist then the attribute value is updated.

    iFrame.setAttribute("style", newStyle);

    }

    • Marked as answer by Nicksoft2011 Monday, July 25, 2016 12:22 PM
    Friday, July 22, 2016 12:48 PM