function setTwoOptionNull(twoOption) {
var isCreateForm = Xrm.Page.ui.getFormType() == 1;
var twoOptionField = Xrm.Page.getAttribute(twoOption);
var twoOptionValue = twoOptionField.getValue();
if (isCreateForm) {
twoOptionField.setValue(null); // set the value to null on create
twoOptionField.setSubmitMode("always"); // required to store the null value
document.getElementById("rad_" + twoOption + "1").onclick = function () {
if (twoOptionValue == false) {
twoOptionField.setValue(true);
twoOptionField.setValue(false);
}
}
}
}
pass the value "new_acceptreject" as shown below
var isCreateForm = Xrm.Page.ui.getFormType() == 1;
var twoOptionField = Xrm.Page.getAttribute(twoOption);
var twoOptionValue = twoOptionField.getValue();
if (isCreateForm) {
twoOptionField.setValue(null); // set the value to null on create
twoOptionField.setSubmitMode("always"); // required to store the null value
document.getElementById("rad_" + twoOption + "1").onclick = function () {
if (twoOptionValue == false) {
twoOptionField.setValue(true);
twoOptionField.setValue(false);
}
}
}
}
pass the value "new_acceptreject" as shown below
No comments:
Post a Comment