function SetAge(birthdate) {
var birthd = Xrm.Page.getAttribute("birthdate").getValue();
if (birthd == null) {
return;
}
var today = new Date().getFullYear();
year1 = birthd.getFullYear();
Xrm.Page.getAttribute("new_age").setValue(today - year1);
}
No comments:
Post a Comment