Hi
I have a created a small javascript functionality where in, onload both the radio buttons(Two - Option Set) are set to null and when i click 'Yes' or 'No' a field becomes required.
Here is the Code -
document.EntityScript.IsDocumentSubmittted_OnChange = function () {
if (Xrm.Page.getAttribute("new_hassubmitted").getValue()) != null) {
var field = Xrm.Page.getAttribute("new_specifydetail");
field.setRequiredLevel("required");
}
else
var field = Xrm.Page.getAttribute("new_specifydetail");
field.setRequiredLevel("none");
}
and on load i have written this -
Xrm.Page.getAttribute("new_hassubmitted").setValue(null);
Now the problem is
<b>On page load,when i click 'No' for the first time , the function does not get invoked however when i click 'Yes' the function gets invoked and after that if i click 'No' the function gets invoked </b>
I want to know What value gets stored in the two-optionset when we set it as 'null'