CRM Software Logo

Microsoft Dynamics 365 & Dynamics CRM experts provide reviews and opinions to aid professionals with the Dynamics 365 selection process.


Microsoft Dynamics CRM Ease of Use Demonstrated with Changing a Form to Read-Only Based on a Field Value: Part II

Email | Print

Microsoft Dynamics CRM is a solution that scales to business needs.  This easy to use system is built on a platform which allows organizations to change the system according to their needs.

In this post, I will demonstrate how to allow some of those fields on the read-only form to be modified.  Let’s say you want a form to be read-only, but there are a couple of exceptions where it’s OK for users to modify the fields.  In Part I my previous blog, I provided step-by-step instructions for adding Javascript to make a form read-only based on a field value.  By adding a few lines to the Javascript, you can specify fields that are modifiable.

In this example, I’ve disabled the Account form if the Account Status = “Customer”, but then enabled the Main Phone, Other Phone, and Fax fields (see highlighted Javascript):

function setupForm()

if (Xrm.Page.ui.getFormType() == 2 && Xrm.Page.getAttribute("new_accountstatus").getValue() == 100000001)


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


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

As a result, the form is read-only, except for the Main Phone, Other Phone, and Fax fields which can be modified:

This is a very simple example of the way Microsoft Dynamics CRM can be configured according to your unique needs.  RSM is a partner with the Gold Customer Relationship Management (CRM) Competency in the Microsoft Partner Network and can implement Microsoft Dynamics CRM solutions from the basic “out of the box” model to a complex architecture. This competency means RSM demonstrates an ability to meet Microsoft customers’ evolving needs in today’s dynamic business environment and has completed a rigorous set of tests to prove their level of technology expertise.

If you are interested in learning more about how RSM can help your organization, our professionals can be reached via email at or by phone at 800.274.3987.

By: Melissa Otto, RSM – Microsoft Dynamics CRM Partner in New Jersey and Minnesota

Comments are closed.


Show Buttons
Hide Buttons