Microsoft CRM 4.0: How to set “valid for update” = 0 for attribute?
-
11-07-2019 - |
Question
I want my attribute to be disabled if the form is in update mode.
I tried to export entity xml and edit value ValidForUpdateAPI documented here but it doesn't work: when I import my customizations CRM ignore them!
Solution
You'll have to do this in JavaScript during the onLoad event. Check the crmForm.FormType attribute and then disable the field if it is '2'.
if (crmForm.FormType == 2)
{
crmForm.all.fieldname.disabled=true;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow