locked
CRM 2011 RU 17 - there was an error with this fields customized event RRS feed

  • Question

  • we are getting the below error while opening "Accounts" records  in CRM 2011 (RU 17)  [RU history : RU 6 + RU8 + RU17] NOte : if we just uninstall RU 17 everything back to normal..

    but the strange thing is that its working on a fresh crm install: (moved same org db) CRM 2011 (RU6 + RU8 + RU17)

    ===========================================

    there was an error with this fields customized event

    field:windows
    event:onload
    error:undefined
    ===========================================

    Here is the onload js .

    //Start ---------------- Multi Select Picklist ---------------------


    //Update >> Provide schemaname for picklist field
    var var_new_picklist = 'ms_extensions';
    //Update >> Provide schemaname for field which will store the multi selected values for picklist
    var var_new_picklistvalue = 'ms_extensionsvalue';

    //Method to convert picklist to multi select picklist
    function ConvertToMultiSelect() {
        // PL - the picklist attribute; PLV - used to save selected picklist values
        //Update >> Provide picklist schema name
        var PL = document.all.ms_extensions;
        //Update >> Provide field name which will store the multi selected values for picklist
        var PLV = document.all.ms_extensionsvalue;

        //alert(PLV);

        if (PL != null && PLV != null) {
            PL.style.display = "none";
            Xrm.Page.getControl(var_new_picklistvalue).setVisible(false);

            // Create a DIV container
            var addDiv = document.createElement("<div style='overflow-y:auto; height:125px; border:2px #669ccc solid; background-color:#87F717;' />");
            PL.parentNode.appendChild(addDiv);

            // Initialise checkbox controls
            for (var i = 1; i < PL.options.length; i++) {
                var pOption = PL.options[i];
                if (!IsChecked(pOption.text, PL, PLV))
                    var addInput = document.createElement("<input type='checkbox' style='border:none; width:25px; align:left;' />");
                else
                    var addInput = document.createElement("<input type='checkbox' checked='checked' style='border:none; width:25px; align:left;' />");

                var addLabel = document.createElement("<label />");
                addLabel.innerText = pOption.text;

                var addBr = document.createElement("<br/>"); //it's a 'br' flag

                PL.nextSibling.appendChild(addInput);
                PL.nextSibling.appendChild(addLabel);
                PL.nextSibling.appendChild(addBr);
            }
        }//end of if
    }//end of function


    ///////Supported functions

    // Check if it is selected
    function IsChecked(pText, PL, PLV) {
        if (PLV.value != "") {
            var PLVT = PLV.value.split(";");
            for (var i = 0; i < PLVT.length; i++) {
                if (PLVT[i] == pText)
                    return true;
            }
        }
        return false;
    }

    // Save the selected text, this field can also be used in Advanced Find
    function OnSave() {
        //Update >> Provide picklist schema name
        var PL = document.all.ms_extensions;

        var getInput = PL.nextSibling.getElementsByTagName("input");
        var result = '';

        for (var i = 0; i < getInput.length; i++) {
            if (getInput[i].checked) {
                result += getInput[i].nextSibling.innerText + ";";
            }
        }

        //save value
        control = Xrm.Page.getControl(var_new_picklistvalue);
        attribute = control.getAttribute();
        attribute.setValue(result);

    }//end of function OnSave()

    //End ---------------- Multi Select Picklist ---------------------



    ja


    • Edited by Ja08 Wednesday, August 6, 2014 12:22 PM
    Wednesday, August 6, 2014 10:51 AM