Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 javascript issue on Rollup 12.

$
0
0

After we installed Rollup 12, we encountered such issue when our custom code from CRM 4.0 to CRM 2011 is not working anymore.

We have a custom page, an aspx page which like an advance find of CRM 4.0, then it was migrated to 2011 works fine before the RU12 now its not triggering when we click the "Search" button.

Our code is the same on this link below:

http://guruprasadcrm.blogspot.com/2011/12/display-fetchxml-in-iframe-in-crm-2011.html

I debug the javascript code and based on it,  its not passing "vDynamicForm = create("<FORM name='vDynamicForm' method='post'>");"

Please see code below:

function FetchViewer(iframeId) {
            var Instance = this;
            var vDynamicForm;
            var m_iframeTab;
            var m_iframeDoc;
            var m_iframeShowModalDialogFunc = null;
            var m_windowAutoFunc = null;

            Instance.Entity = "";
            Instance.Iframe = null;
            Instance.FetchXml = "";
            Instance.QueryId = "";
            Instance.LayoutXml = "";
            Instance.WithParentContext = false;
            Instance.EntityCode = 0;


            function RefreshOnReadyStateChange() {
                if (Instance.Iframe.readyState != 'complete')
                    return;

                Instance.Refresh();
            }

            Instance.Refresh = function() {
                Instance.Iframe = document.getElementById(iframeId);
                if (!Instance.Iframe)
                    return alert("Iframe " + iframeId + " is undefined");

                m_iframeDoc = getIframeDocument();

                Instance.Iframe.detachEvent("onreadystatechange", RefreshOnReadyStateChange);

                var create = m_iframeDoc.createElement;
                var append1 = m_iframeDoc.appendChild;
                vDynamicForm = create("<FORM name='vDynamicForm' method='post'>");

                var append2 = vDynamicForm.appendChild;
                append2(create("<INPUT type='hidden' name='FetchXml'>"));
                append2(create("<INPUT type='hidden' name='LayoutXml'>"));
                append2(create("<INPUT type='hidden' name='EntityName'>"));
                append2(create("<INPUT type='hidden' name='DefaultAdvFindViewId'>"));
                append2(create("<INPUT type='hidden' name='ViewType'>"));
                append1(vDynamicForm);

                if (authenticationType == 0) {
                  
                    if ('<%= IsCrmOnline %>' == 'True') {
                        vDynamicForm.action = "/" + '<%= OrganizationName %>' + "/AdvancedFind/fetchData.aspx";
                    }
                    else {
                        vDynamicForm.action = "/AdvancedFind/fetchData.aspx";
                    }
                }
                else {
                    vDynamicForm.action = "/AdvancedFind/fetchData.aspx";
                }
                vDynamicForm.FetchXml.value = Instance.FetchXml;
                vDynamicForm.LayoutXml.value = Instance.LayoutXml;
                vDynamicForm.EntityName.value = Instance.Entity;
                vDynamicForm.DefaultAdvFindViewId.value = Instance.QueryId;
                vDynamicForm.ViewType.value = 1039;
                vDynamicForm.submit();


            }

I don't know right now what the reason behind on this code:

vDynamicForm = create("<FORM name='vDynamicForm' method='post'>");

Thanks in advance..


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>