JavaScript:
function OnLoadForm(){ setTwoOptionNull("new_tender"); }
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); } } } }
沒有留言:
張貼留言