Check for double booking using workflows in SP2010
-
Dienstag, 1. Mai 2012 09:25
Hi
I'm trying to build ressource booking system using SP2010 and InfoPath 2010.
I have a an InfoPath form, a Reservations list, a Ressource calendar and a custom workflow built in SharePoint 2010 Designer.
The goal is to create a setup, where users can reserve ressources (in this case holiday houses) using an InfoPath form. The form creates a new item in Reservations list. On that list I have a workflow, that is started when a new item is created. The workflow starts an approval process. If the reservation is approved a new event is created in the calendar.
The problem is that I would like the workflow to check for double booking before starting the approval process. If the holiday house is already booked in the gived period there is no reason to start an approval process.
But I can't see how I can get the workflow to check the bookings in the calendar???
The funny thing is if I create a new event in the calendar using the GUI there is a check for double booking!?
Can anybody help?
Thanks.
Alle Antworten
-
Donnerstag, 3. Mai 2012 05:46Moderator
Hi ,
As far as I know ,check double booking using a SharePoint designer workflow is not an option .I would recommend using event handler to prevent adding duplicate bookings when add items to Reservation list .Add an itemadding event handler on the Reservation list to prevent item form adding if there is a duplicate item in the list already .Then you can add an approval workflow on the list to approve and create event in a group calendar .
For more information about create an itemadding event handler ,please refer to this site:
Setting up multiple calendars for meeting room bookings & prevent double booking: http://blog.sharepointsydney.com.au/post/Setting-up-multiple-calendars-for-meeting-room-bookings-prevent-double-booking.aspx
Creating a SharePoint Event Handler : http://msdn.microsoft.com/en-us/library/ff407274.aspx
ThanksEntan Ming
TechNet Community Support
- Als Antwort markiert Entan MingMicrosoft Contingent Staff, Moderator Donnerstag, 10. Mai 2012 09:01
-
Donnerstag, 10. Mai 2012 10:34
It wasn't the answer I wanted to hear, but that's not your fault :-)
Thank you for a quick reply!
Unfortunately coding an event receiver is not an option for me at the moment, but I found this http://www.youtube.com/watch?v=Y0T_XGwJXhg, and have ordered the book, so I'm going for a solution where the InfoPath form checks for overlapping events.
Thanks
Allan Stengaard

