Tuesday, November 9, 2021

Make All Field Read only MSCRM or Model Driven apps


Introduction:


In this blog we will see how to make all the filed as Read- Only using Javascript in MSCRM/DataVerse environment.



Implementation steps:


Copy the Below Code in your OnLoad Operation to make all the Fields Read Only


function MakeAllFieldReadOnly(){

 Xrm.Page.data.entity.attributes.forEach(

  function (attribute, index) {

      var attributeName = attribute.getName();

          Xrm.Page.getControl(attributeName).setDisabled(false);

  });

}

No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...