function onChangeСlient () {
var value = Xrm.Page.getAttribute("client").getValue();
if (value)
Xrm.Page.getAttribute("formerclient").setValue(false);
}
function onChangeFormerClient() {
var value = Xrm.Page.getAttribute("formerclient").getValue();
if (value)
Xrm.Page.getAttribute("client").setValue(false);
}
function changeAttribute() {
var value = Xrm.Page.getAttribute("familystatuscode").getValue();
if (value == 1) {
Xrm.Page.getAttribute("spousesname").setRequiredLevel("none");
}
else {
Xrm.Page.getAttribute("spousesname").setRequiredLevel("required");
}
}
function changeAttribute() {
var value = Xrm.Page.getAttribute("familystatuscode").getValue();
var visibleValue = value == 1;
Xrm.Page.getControl("spousesname").setVisible(visibleValue);
}
function sameFieldChange() {
var value = Xrm.Page.getAttribute("manager").getValue();
var isError = value == 1;
var control = Xrm.Page.getControl("assistant");
if (isError) {
control.setNotification("Manager equals Assistant. Please, set another person as a Manager");
}
else {
control.clearNotification();
}
}
How we process your personal data