@Override protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (form.getForms().Emergency.ReasonForBreach.equals(formName) && DialogResult.OK.equals(result)) { if (save(form.getGlobalContext().Emergency.getReasonForBreach())) open(); } else if (form.getForms().Emergency.TrackingStatusDialog.equals(formName) && DialogResult.OK.equals(result)) { //WDEV-17408 if (DischargeDetails_CustomEvents.UNDO.equals(form.getLocalContext().getCustomEvent())) { if (save(null)) { open(); } } else if (removeBed(form.getGlobalContext().Emergency.getTrackingAttendanceStatus())) open(); } //WDEV-17337 if (DialogResult.OK.equals(result)) { form.getLocalContext().setCustomEvent(DischargeDetails_CustomEvents.SAVE); form.fireCustomControlValueChanged(); } }