Disable Form Fields in CRM 2011

How to Disable Form Fields in CRM 2011

This article is different from the previous one. This time, we are going to disable all the fields on a form in CRM 2011. The sample Java script is shown below.

function disableFormFields(onOff) {
Xrm.Page.ui.controls.forEach(function (control, index) {
if (doesControlHaveAttribute(control)) {

function doesControlHaveAttribute(control) {
var controlType = control.getControlType();
return controlType != “iframe” && controlType != “webresource” && controlType != “subgrid”;


Leave a comment

Filed under Disable Form Fields, MS Dynamic CRM 2011

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 )

Facebook photo

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

Connecting to %s