Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Disabling all fields in CRM 2013 (Orion)

$
0
0

All am disabling all the fields on the form. Fields except the check boxes are disabling.

Can you help why check boxes are not disabled.

The code is :

function disableFormFields(onOff) {

   Xrm.Page.ui.controls.forEach(function (control, index) {

       if (doesControlHaveAttribute(control)) {

           control.setDisabled(onOff);

       }

   });

}

function doesControlHaveAttribute(control) {

   var controlType = control.getControlType();

   return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";

}

Why this code is not working fine in CRM 2013. This is working fine in CRM 2011.

Thanks!!!!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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