I have this error when I want to add a record to the form of my dynamics 365 and this is what I have in the script
function VisibleRiskLevelField(executionContext) {
var formContext = executionContext.getFormContext();
if (formContext.getAttribute("axn_shephaseii").getValue() != null ) {
formContext.getControl("axn_risklevel").setVisible(false);
formContext.getAttribute("axn_risklevel").setRequiredLevel("none");
}else {
DisabledField();
}
}






