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 23: Creating New Records Programmatically with JavaScript in Dataverse / MSCRM

In this Blog, we will see how to Create New Records Programmatically with JavaScript in Dataverse / MSCRM var record = {}; record.bosch_day...