Maybe this post will give some help. It is some help i provided someone previously. It relates particularly to the Event object, but should give you some direction.
The logic would be if the new Starttime is within the Existing OR new EndTime is within the Existing OR the new Record starts before and ends after the Existing.
Maybe this post will give some help. It is some help i provided someone previously. It relates particularly to the Event object, but should give you some direction.
The logic would be if the new Starttime is within the Existing OR new EndTime is within the Existing OR the new Record starts before and ends after the Existing.
Maybe this post will give some help. It is some help i provided someone previously. It relates particularly to the Event object, but should give you some direction.
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000IKZPQA4
And you may want to review the testing for date/times - reviewing that one it seems incomplete, but maybe my mind is wandering.
The logic would be if the new Starttime is within the Existing OR new EndTime is within the Existing OR the new Record starts before and ends after the Existing.
HTH
Regards
Andrew
All Answers
You can refer https://developer.salesforce.com/forums/?id=906F000000094R2IAI
I want to prevent booking which is happening at 7:30pm. Infact 7pm to 8pm already booking is there
Maybe this post will give some help. It is some help i provided someone previously. It relates particularly to the Event object, but should give you some direction.
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000IKZPQA4
And you may want to review the testing for date/times - reviewing that one it seems incomplete, but maybe my mind is wandering.
The logic would be if the new Starttime is within the Existing OR new EndTime is within the Existing OR the new Record starts before and ends after the Existing.
HTH
Regards
Andrew