Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to make a list where you can book one or more resources and it should not be possible to book the same resource twice in the same timespan.

How can this be done?

Any suggestions apart from adding third party solutions...? Would like to make my own...

share|improve this question
add comment

2 Answers

You might want to look at the template that was designed in the Fantastic 40 for booking meeting rooms. I would not use this template in production, but you could install it and play with it in a dev environment and utilize elements of it for your project. http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx

share|improve this answer
    
Too bad it's only for 2007 (Upgrade process looks a bit confusing and it's not worthwhile) –  Vedran Rasol Jul 29 '11 at 11:48
add comment

You need to create EventReceivers for ItemAdding and ItemUpdating.

In these events, run query to check the given Start and End DateTime are not overlapping to any item already in the list. This can be achieved by CAML query using DateRangesOverlap and ExpandRecurrence properties.

Please check the following link for a code example: http://sridharu.blogspot.com/2008/01/how-to-read-recurring-events-using-caml.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.