Hi, I am using the following code where "If we select any value from the optionset,firstname should be read only",but i am getting an error--unable to get the property set disabled,if i chose some other field in place of first name,with any selection in the optionset that field is made readonly
code:
function firstnamereadonly()
{
var option = Xrm.Page.getAttribute("new_contactrole").getOptions();
for(var i in option)
{
if(option[i].value == 4)
Xrm.Page.getControl("firstname").setDisabled("true");
else
Xrm.Page.getControl("firstname").setDisabled("false");
}
}
Thanks in Advance
*This post is locked for comments
Used ur code,
unable to get "propery set disabled", was the error message
can you please check on this
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156