Empowering users in Dynamics CRM is great but one needs to be prepared to troubleshoot adventures of a power user. If you have a rule that locks the field when certain conditions are met, beware what happens when this field is editable. That’s right, the last edit will be lost. Why? because locking the field is a common-speak for disabling the control and, as most of readers know, CRM
cannot be stuffed to send saves the bandwidth by not sending content of the disabled controls.
Unfortunately, there is no definite answer to this challenge in “no code” land but the solution is fairly trivial – all we need to do is to force content submission for the control by wiring something like the following to the form OnSave event:
function account_onsave() { if(Xrm.Page.getControl("emailaddress1") .getDisabled()) { Xrm.Page.getAttribute("emailaddress1") .setSubmitMode("always"); } }