dear all
i do have some flags on opportunity form related to child cases (belonging to the opportunity), if these cases get resolved, i update these flags back to opportunity.
i am doing this in order to prevent the user from advancing in the opportunity without resolving the related cases, but this also makes the opportunity refuses any save operation for the rest of the fields until the said cases resolved.
i have tried this validation using business rules, and one more time using JS , but same problem, if the validation condition occurs , then a warning message appears (which is fine) but also no save is allowed.
please check the following JS segment as well as the opportunity form image.
if ((case_1_added == "Yes") && (case_1_status != "Resolved")) {
Xrm.Page.ui.setFormNotification("You can't proceed until the related Document Review case is resolved. Then try again.", "ERROR", "2001"); // Set notification
context.getEventArgs().preventDefault();
return false;
}
else {
Xrm.Page.ui.clearFormNotification("2001"); // Clear notification
}