IFrame to a custom entity not working RRS feed

  • Question

  • Hi All,

    I've read and followed numerous blog posts related to this issue and I thought I followed everything correctly, however I am still having problems. Basically, I have a custom entity (sold business) and want to display another custom entity (sold benefit) via an iframe. Here is my code that is located in Sold Business > Form > Form Properties > OnLoad:

    var navId = “neu_neu_soldbusiness_neu_soldbenefit”;

    if(document.getElementById(navId) != null)
    var tmp = document.getElementById(navId).onclick.toString();
    tmp = tmp.substring(tmp.indexOf(“‘”)+1, tmp.indexOf(“;”));
    var loadArea = tmp.substring(0, tmp.indexOf(“‘”));
    var roleOrd =  (tmp.indexOf(“roleOrd”) == -1) ? -1 : tmp.substring( tmp.indexOf(“roleOrd”), tmp.lastIndexOf(“‘”)).replace(“\\x3d”, “=”);
    crmForm.all.IFRAME_soldbenefit.src = (roleOrd == -1) ? GetFrameSrc(loadArea) : GetFrameSrc(loadArea) + “&” + roleOrd;


    function GetFrameSrc(tabSet)
    if (crmForm.ObjectId != null)
    var id = crmForm.ObjectId;
    var type = crmForm.ObjectTypeCode;
    var security = crmFormSubmit.crmFormSubmitSecurity.value;
    var path = document.location.pathname.substring(0, document.location.pathname.indexOf(“edit.aspx”)) + “areas.aspx?”;

    return (path + “oId=” + id + “&oType=” + type + “&security=” + security + “&tabSet=” + tabSet);
    return “about:blank”;

    After publishing, all that appears is a blank box. When I save and close a sold benefit record I receive an error that states:

    "Microsoft Dynamics CRM has encountered an error. Please tell Microsoft about this problem." The error gives me the usual "send error report" or "don't send."

    My code knowledge is novice at best so this is my last resort to help find a solution.


    Wednesday, August 10, 2011 10:39 PM


All replies