Ricibald
Ricibald

Reputation: 9929

Microsoft CRM 4.0: How to set "valid for update" = 0 for attribute?

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!

Upvotes: 0

Views: 849

Answers (1)

Mikeyb
Mikeyb

Reputation: 416

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;
}

Upvotes: 2

Related Questions