locked
Get record id from Iframe RRS feed

  • Question

  • The following code worked fine previously. Now I am using an Iframe on CRM online:-

    function getSelectedRecord() {
        var frameDoc = document.getElementById("IFRAME_Contacts").contentWindow.document;
        var a = frameDoc.all['crmGridControl'].InnerGrid.SelectedRecords;
        var selectedItems;
        if (a.length == 1) {
             selectedItems = new Array(a.length);
            for (var i = 0; i < a.length; i++) {
                selectedItems[i] = a[i][0];

       
            }
        }
        alert(selectedItems);
    }

    It is coming up with error message:-

    Error:'all.crmGridControl.InnerGrid.SelectedRecords' is null or not an object

    Any help will be appreaciated


    Regards Faisal

    Tuesday, August 13, 2013 9:26 AM