Issue
- In Liferay Portal 6.1, calendar notifications could be disabled using portal-ext.properties
- In Liferay DXP 7.0+, these properties no longer exist
Environment
- Liferay DXP 7.0+
Resolution
NOTE: This resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.
- The best option is to create a wrapper for the CalendarBookingLocalService
- The wrapper needs to set the value false for the attribute sendNotification of the object serviceContext just before calling the methods to add and update a Calendar event and before calling the method to update the Calendar event status.
- This solution handles all Calendar notifications, except the reminder notifications, which are actively configured by the users.
- Code to be added before method calls, which disables the Calendar notifications:
1serviceContext.setAttribute("sendNotification", Boolean.FALSE);
- List of methods which need to be added to the CalendarBookingWrapper:
- You will need to also copy the code from addChildCalendarBookings to the wrapper, and set the sendNotification parameter to false just before the call of the method sendNotification, you should remove this line.
Additional Information
- Additionally, please reference the following article to see how to create a wrapper for a Liferay service: How to create a service wrapper in Liferay 7.0
- Feature request LPS-96398 has been created to add this feature