Pages

Friday, 14 March 2014

Disable all fields in single section


Disable all fields in one section in Microsoft dynamics CRM using javascript



function sectiondisable()
{
    var ctrlName = Xrm.Page.ui.controls.get();
    for(var i in ctrlName) {
         var ctrl = ctrlName[i];
         if(ctrl.getParent()!=null){
         var ctrlSection = ctrl.getParent().getName();         
         }
         if (ctrlSection == "ACCOUNT_INFORMATION") {
               ctrl.setDisabled(true);
        }
    }

No comments:

Post a Comment