Posted in CRM

Making Form readonly Through Javscript

Making Form Read only Through JavaScript

Making all the fields in a form Locked(i.e read only) through java script

function lock() {
   var controls = Xrm.Page.ui.controls.get();
   for (var i in controls) {
   var control = controls[i];
   if (control.getDisabled && control.setDisabled && !control.getDisabled()) {
       control.setDisabled(true);
       }
   } 
 }
Screenshot (64).png
Let’s Enjoy 🙂
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s