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!

Was it helpful?

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
scroll top