locked
CRM 2013 - disabling "address1_Composite" doesn't work RRS feed

  • Question

  • Hi,

    I have a script that disable all fields in a form when a specific value is selected in a field. This code below's working perfectly :

     

    function setFormDisabled() {
        var controls = Xrm.Page.ui.controls.get();
        for (var i in controls) {
            var control = controls[i];
            if (control.getControlType() != "subgrid") {
                if (!control.getDisabled()) {
                    control.setDisabled(true);
                }
            }
        }
    }

    Except the composite field "address1_composite". This composite is disabled when the function "setFormDisabled" is called but when i click on save, the composite field turn to be enabled and i can change this first field "Address1_line1" !! So i tried to put in the form all fields used in the composite separately and you know what.... They are disabled !

    I don't understand what's appening with this composite field.

    Thank you very much for your help.

    regards,

    Jean-Michel

    Monday, July 28, 2014 2:37 PM