Search in sources :

Example 1 with EventReminderRepository

use of com.axelor.apps.crm.db.repo.EventReminderRepository in project axelor-open-suite by axelor.

the class EventController method deleteReminder.

@Transactional(rollbackOn = { Exception.class })
public void deleteReminder(ActionRequest request, ActionResponse response) {
    try {
        EventReminderRepository eventReminderRepository = Beans.get(EventReminderRepository.class);
        EventReminder eventReminder = eventReminderRepository.find((long) request.getContext().get("id"));
        eventReminderRepository.remove(eventReminder);
        response.setCanClose(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : EventReminderRepository(com.axelor.apps.crm.db.repo.EventReminderRepository) EventReminder(com.axelor.apps.crm.db.EventReminder) AxelorException(com.axelor.exception.AxelorException) Transactional(com.google.inject.persist.Transactional)

Aggregations

EventReminder (com.axelor.apps.crm.db.EventReminder)1 EventReminderRepository (com.axelor.apps.crm.db.repo.EventReminderRepository)1 AxelorException (com.axelor.exception.AxelorException)1 Transactional (com.google.inject.persist.Transactional)1