0

How can I add the control to the configuration screen of a calendar event? overlapping of events or if the same user "assigned to" already has an event in calendar (even partial) between "Start date and time" and "End date and time" of the new one event by clicking the "Save" button a warning popup must appear with the message "It is already present a calendar event at this juncture, we want to proceed?"

The selection YES will create the calendar event, the NO choice will return to edit mode on the event.

DevOkAnd
  • 113
  • 1
  • 2
  • 8

1 Answers1

1

One strategy would be to create an ajax action in the events module that receives start and end date & time and checks whether the current user has an overlapping event.

Then you create a JS script that listens to the onclick event of the Save. When clicking on the button you then call the ajax action and process the response.

That's the general idea. Take a look at other ajax actions in Vtiger to have an example.

Ruben Estrada
  • 338
  • 1
  • 7
  • Sorry, I don't have a simple example. But you can take a look inside vtigercrm/modules/Vtiger/actions, there you will find several action controllers. Yo would have to create one of those to see if there are overlapping events. Then you would also have to create the javascript code that makes the ajax call to get the information you need. The vtiger documentation for developers could help: https://community.vtiger.com/help/index.html – Ruben Estrada Dec 19 '18 at 17:25