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
I have the same question (0)


Report
All responses (
Answers (