Hi experts,
I am new to CRM and trying to learn. I am trying to customise the contact form. My case is as follows
I have created a date of birth type as option set with following
Accurate - 1
Estimate - 2
Unknown - 3
Now on the form, i have date of birth field. If the date of birth type is either accurate (1) or estimate (2), then i want to make the date of birth as required. Otherwise date of birth is not required. Here is the script. But it is not working. Anticipating help
function DateOfBirthType() {
var DOB_Type =
Xrm.Page.getAttribute('new_dateofbirthtype').getValue();
if (DOB_Type == 1 || DOB_Type == 2){
Xrm.Page.getAttribute('new_dateofbirth').setRequiredLevel('required');
}
else {
Xrm.Page.getAttribute('new_dateofbirth').setRequiredLevel('none');
}
}
*This post is locked for comments
I have the same question (0)