开发者

Making a field unavailable to a user with javascript in MS CRM 4

I am trying 开发者_JAVA百科to disable a field, i.e. grey it out and not allow the user to select it. To achieve this effect I am currently calling

crmForm.all.new_attribute1.disabled = true; 
crmForm.all.new_attribute2.Disabled = true;

The Disable, with a capital D, makes the field grayed out but the user can still put the cursor in that field or tab to it.

The disable, with a little d, makes the field unavailable to the cursor and via tab, but gives no visual indication that it can't be interacted with.

Is there a better way to do this, one call that will achieve similar results or am I stuck having both there?


Using "Disabled" property should work.

You can try putting this code in OnLoad event of Account entity (don't forget to enable Event and Publich entity!):

crmForm.all.accountnumber.Disabled = true;

And "Account Number" will be blocked and greyed as seen in this picture:

Making a field unavailable to a user with javascript in MS CRM 4


(source: vidmar.net)


You are talking about readOnly and disabled.

A great article was posted http://customerfx.com/pages/crmdeveloper/2006/03/06/readonly-and-disabled-fields.aspx ... maybe this could help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜