Customer Collision

Hi,

when a new appointment is created it is possible to check whether the user is free for this event?

Now i create ne events with a flexible number of responsible employeers (multiple checkboxes). When I create a new event, I would like to check whether I can assign the employee for that time period.

Thank you for your help.

You can call scheduler.getEvents(start_date, end_date) which will return an array of events, which are occurs in the same time. Now you can iterate through them and check if any belongs to the user in question - if you fill find 2 or more such events - than you have a collision.

collision extension can do it automatically in unit|timeline view ( here it will block event creation if unit in question already has some event for that time )

Ok…thank you. I’ll try it and then give feedback.

Hi,

when I try this code

var evs = scheduler.getEvents(new Date(2010,1,1),new Date(2011,11,11)); 
for (var i=0; i<evs.length; i++)
{
      alert(evs[i].text);		
}

nothing happens! I don’t know why?!? During this period several events available.

Thanks