locked
Problem setting source for IFrames in CRM 2013 on-premise RRS feed

  • Question

  • You cannot vote on your own postWe recently did a test migration from CRM 4.0 to CRM 2011 and decided to upgrade to CRM 2013 instead.  All the javascript was updated and working in our CRM 2011 test environment but we're now having issues setting the source for IFrames in 2013 using the same code.  This issue was raised here before but was unresolved.  Is anyone else having this problem in CRM 2013?

    Here's the code for the form's onload()

    function Form_onload() {

        var FORM_TYPE_CREATE = 1;
        var FORM_TYPE_UPDATE = 2;
        var FORM_TYPE_READ_ONLY = 3;
        var FORM_TYPE_DISABLED = 4;
        var FORM_TYPE_QUICK_CREATE = 5;
        var FORM_TYPE_BULK_EDIT = 6;

        var formType = Xrm.Page.ui.getFormType();

        if (addEventListener) {
            addEventListener('message', receiveMessage, false);
        } else if (attachEvent) {
            attachEvent('onmessage', receiveMessage);
        }

        var formId = Xrm.Page.data.entity.getId();

        var imageUploadPath = "/SsrcCrmInt/image uploading/image_upload.aspx?oId=" + formId;
        var bioPath = "https://crmcustom.ssrc.org/SsrcCrmCustom/programs/telerik_html.aspx?oId=" + formId + "&content_category_id=3";
        var linksPath = "https://crmcustom.ssrc.org/SsrcCrmCustom/programs/telerik_html.aspx?oId=" + formId + "&content_category_id=4";

        if (formType != FORM_TYPE_CREATE && formType != FORM_TYPE_QUICK_CREATE) {
            Xrm.Page.getControl("IFRAME_ParticipationOverview").setSrc("http://crmcustom.ssrc.org/SsrcCrmCustom/contacts/participation_overview.aspx?oId=" + formId);
            Xrm.Page.getControl("IFRAME_file_upload").setSrc(imageUploadPath);
            Xrm.Page.getControl("IFRAME_bio").setSrc(bioPath);
            Xrm.Page.getControl("IFRAME_links").setSrc(linksPath);
        }
    }

    Thursday, October 31, 2013 6:35 PM

All replies

  • We recently did a test migration from CRM 4.0 to CRM 2011 and decided to upgrade to CRM 2013 instead.  All the javascript was updated and working in our CRM 2011 test environment but we're now having issues setting the source for IFrames in 2013 using the same code.  This issue was raised here before but was unresolved.  Is anyone else having this problem in CRM 2013?

    Here's the code for the form's onload()

    function Form_onload() {

        var FORM_TYPE_CREATE = 1;
        var FORM_TYPE_UPDATE = 2;
        var FORM_TYPE_READ_ONLY = 3;
        var FORM_TYPE_DISABLED = 4;
        var FORM_TYPE_QUICK_CREATE = 5;
        var FORM_TYPE_BULK_EDIT = 6;

        var formType = Xrm.Page.ui.getFormType();

        if (addEventListener) {
            addEventListener('message', receiveMessage, false);
        } else if (attachEvent) {
            attachEvent('onmessage', receiveMessage);
        }

        var formId = Xrm.Page.data.entity.getId();

        var imageUploadPath = "/SsrcCrmInt/image uploading/image_upload.aspx?oId=" + formId;
        var bioPath = "https://crmcustom.ssrc.org/SsrcCrmCustom/programs/telerik_html.aspx?oId=" + formId + "&content_category_id=3";
        var linksPath = "https://crmcustom.ssrc.org/SsrcCrmCustom/programs/telerik_html.aspx?oId=" + formId + "&content_category_id=4";

        if (formType != FORM_TYPE_CREATE && formType != FORM_TYPE_QUICK_CREATE) {
            Xrm.Page.getControl("IFRAME_ParticipationOverview").setSrc("http://crmcustom.ssrc.org/SsrcCrmCustom/contacts/participation_overview.aspx?oId=" + formId);
            Xrm.Page.getControl("IFRAME_file_upload").setSrc(imageUploadPath);
            Xrm.Page.getControl("IFRAME_bio").setSrc(bioPath);
            Xrm.Page.getControl("IFRAME_links").setSrc(linksPath);
        }
    }

     

     
    Thursday, October 31, 2013 6:29 PM