Script:
function DefineMaleFemale() {
var NRIC = Xrm.Page.getAttribute("vwlzs_identificationnum").getValue();
if (NRIC != null) {
var last = NRIC.charAt(NRIC.length - 1);
if (isEven(last) == true) {
Xrm.Page.getAttribute("vwlzs_gender").setValue(true); //Female
}
else {
Xrm.Page.getAttribute("vwlzs_gender").setValue(false); //Male
}
}
}
function isEven(value) {
if (value % 2 == 0)
return true;
else
return false;
}
CRM 2013 Javascript Define Gender Through NRIC/MyKad
Posted by Unknown at 1/13/2015 02:44:00 pm
Labels: CRM 2013, Javascript
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment