Rooms and Equipment Reservations v2 (UNOFFICIAL)


Introduction

Microsoft released the Fabulous 40 Application Templates for SharePoint 2007 a (long) while ago. One of them is Rooms and Equipment Reservations (link) where you can make bookings for conference rooms, material, etc and get a visual overview of all bookings.

Issues

If you really start using this template you will find it has numerous shortcomings. I've been working on my own version to tackles some of these. It's basically the standard template but I've replaced the event handlers with my own custom ones.

The biggest issue for example is that changing a reservation's resource incorrectly updates the availability and messes up the entire reservation system.

Another one occurs for users with Add, Delete permissions (note: no Edit) when they create new reservations. This should all be solved with my event handlers...

Download

  • RERv2_1033.stp - This site template displays the date format on the Availability page in US date format
  • RERv2_2067.stp - This site template displays the date format on the Availability page in Belgian date format
  • RoomEquipmentReservationsV2.stp - This solution contains the assembly with custom event handlers
  • VS 2008 CODE - Feel free to modify and improve the code as required

Deployment

This package requires that the standard ApplicationTemplateCore and RoomEquipmentReservations are already deployed. It is by no means a standalone package.

  1. Deploy the solution to your SharePoint farm
  2. Upload one or both of the STP's to the Site Collection's Site Template Gallery
  3. Create a new site based on one of the site templates

Notes

You can change the regional settings for date formatting in Site Settings but the Availability page has the LCID and 24 hour formatting hardcoded. That's why there are two versions of the site template...

Use at own risk ;-)

Resources

 


Links to this post

Comments

Wednesday, 23 Apr 2008 03:42 by Joe Johnston
This is good information. Just knowing the shortcomings of the origional app is a major step forward!! I appreciate your efforts to explain this. Now I will try to make the VS2008 code work in VS2005 since I am restricted from using VS2008 until its approved by whoever. ;p Great Resource thanks,

Saturday, 26 Apr 2008 03:09 by Nico
Thanks for the post, we experienced the issues too after a month of production, the calendar seems to autorize two reservations for a same time when the user modifies his/her reservation so we decided to redevelop the app with sql server (snapshot technique) with the calendar of the template. After 6 months of production, the list "Reservations" of the template have approximatively 5,000 items which seems me a lot. So with sql server we have a job who purge the table reservation. And now all is OK...

Tuesday, 1 Jul 2008 02:47 by tony
Hi, I tried the RERv2_1033.stp but the "Reserve a Resource" page did not show availablity correctly. For example, I reserved a resource and went back to the page and it showed it was available. Any idea what could be wrong? Thanks. Please note that using original version didn't exhibit the same problem.

Monday, 7 Jul 2008 05:24 by Nate
I have run into a strange issue, we deployed the MS RER .wsp and the RERv2 .wsp, then uploaded the 1033 site template to the gallery; however, when attempting to reserve a resource via the site created using the v2 template, we get "The resource you are trying to reserve is not available at the time you specified." But the original MS RER .wsp works fine when using the same account to create and reserve a resource.... any ideas? Thanks!

Monday, 14 Jul 2008 03:31 by Priyanka
Hi Steven, I have just started using the reservations template. I am encountering the same problem as shown by you, but the thing is in the calendar, all the resources appear fully booked (that is purple color all across all the resources for all the coming dates.). Its a new site, and have created the resources just a day back. I tried deleting all the resources and then starting afresh, but it did not work. Then I tried to reserve through a different account then system a/c but having the full permissions. Please help, as without the basic thing working I cannot move forwards with the customization.

Tuesday, 22 Jul 2008 11:39 by Steven Van de Craen
All: When you create a new resource the "Setup" Workflow will automatically 'Complete'. If this isn't the case the system is screwed up and you'll have to delete that resource. Completing the workflow will make it reservable. Is this the issue ? Does the workflow start and complete correctly ?

Friday, 1 Aug 2008 07:13 by Nate
Hi Steven, Thanks for gettin back to me. My issue is that i create a brand new resource, the workflow completes, and the resource appears available for booking(its white, not purple). However, when I attempt to book a timeslot i get the above mentioned error message. The weird part is everything works beautifully on my virtual machine, but we can't get it to work on our dev or production sites. What do you think the issue might be?? The stack trace looks like this: Thanks for any help you can provide!!! [COMException (0x81020089): Error Adding Reservation: The resource you are trying to reserve is not available at the time you specified.(Debug: RERStatus) resource: 1 start time: 8/4/2008 9:00:00 AM End Time: 8/4/2008 10:00:00 AM] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0 Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +411 [SPException: Error Adding Reservation: The resource you are trying to reserve is not available at the time you specified.(Debug: RERStatus) resource: 1 start time: 8/4/2008 9:00:00 AM End Time: 8/4/2008 10:00:00 AM] Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +556 Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents) +3030 Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents) +632 Microsoft.SharePoint.SPListItem.Update() +194 Microsoft.SharePoint.WebControls.SaveButton.SaveItem(SPContext itemContext, Boolean uploadMode, String checkInComment) +357 Microsoft.SharePoint.WebControls.SaveButton.SaveItem() +111 Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +476 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +39 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215

Monday, 4 Aug 2008 10:03 by Steven Van de Craen
Nate, it seems the Setup workflow on the Resource list never fires. Can you confirm this ? Also, do you have variations (MOSS) enabled ?

Friday, 26 Sep 2008 12:32 by Emília Morim
Hi, I need add recurrence to the reservacions for. How can I do it?

Monday, 29 Sep 2008 10:56 by Steven Van de Craen
Recurreny is really complex and I don't really know how to implement it. I tried once but got stuck quite early on. Good luck though !

Tuesday, 30 Sep 2008 04:47 by Bill Altmann
Want to clone availability.aspx in the Reservations folder. Copy and paste availability.aspx fails with "Server Error: Your Start Date must occur before your End Date."

Wednesday, 1 Oct 2008 08:27 by Bill Altmann
Let's say we want to retrieve all today's Reservations with their Status ( a hidden field ) and then display them according to their Status. Because Status is a hidden field we cannot retrieve Status. Is this correct?

Thursday, 2 Oct 2008 02:17 by Steven Van de Craen
Bill, because that page lives inside the List it is under the regulations of the event receiver. I did not foresee this but it could be fixed by excluding validation for 'Page' items. If not then you need to detach the ItemAdding/ItemUpdating event temporarily and make your modifications (not the best way of course but fix 1 would require coding).

Friday, 3 Oct 2008 02:12 by Bill Altmann
Thanks Steven. That's what I did: public override void ItemAdding( SPItemEventProperties properties ) { if (properties.ListItem.ContentType.Name.Equals( "Resource Reservation" )) { ... } } // End of ItemAdding.

Friday, 17 Oct 2008 07:05 by Stacie
Hi Steven, thank you so much for this code. I was wondering if you knew how I can get the Reserved by field to show up on the calendar month view. I tried using a calculated field but the Reserved by field is not available as a selection. Any help would be greatly appreciated. Thanks.

Friday, 17 Oct 2008 10:16 by Stacie
Hi, I just implemented the solution you provided and I am having problems with booking a time slot for a conference room using the day-at-a-time chart view. When I use this view whatever time slot I choose it makes everything other than that time slot unavailable. So if I make the time from 1 to 2pm, this time slot shows open and then anything before or after this time appears unavailable. Any ideas on how to fix this?

Wednesday, 3 Dec 2008 06:06 by Steve Smith
Great stuff!!! Any tips on how to turn the blue bar into a link to the underlying item? This would enable users to see who's made each individual booking. Mike

Thursday, 4 Dec 2008 05:07 by Steven Van de Craen
Steve, ping me via the Contact Page and I'll send you the info. I actually have it but it is the 2067 version. I've been getting more requests for the RERv2 so maybe it's time for an update.

Wednesday, 10 Dec 2008 10:46 by Jim Hall
Steven great work. We have been trying to implement the Microsoft version but the shortcomings always got in the way. Installed your version and it resolve most if not all problems. Thanks

Monday, 15 Dec 2008 12:21 by Jacob K
Steven, thanks for your v2, it has solved most of our problems. However a new issue has occurred: replacing the ressource in an existing reservation and making a new reservation on the original resource does not work. The original resource appears to be taken, even though there are no reservations. Any idea?

Tuesday, 16 Dec 2008 01:49 by Steven Van de Craen
Jacob, if you're adding a resource using the System account then the Setup workflow will not run. This is by design. For now use a different user to add the resource. I'm planning on a RER v3 where it uses an event receiver rather than workflow to solve this kind of problems.

Thursday, 18 Dec 2008 01:59 by Jacob K
Steven, sorry I did not explain my self properly: I open an existing reservation and change the meeting room to another. After that I cannot reserve the original meeting room for that day - it still appears to be reservered. (I have tried doing this both with my own site collection admin account and a normal domain user). The other problem I have already tried!

Monday, 22 Dec 2008 10:37 by Steven Van de Craen
Hi Jacob, the RER and RERv2 is not very stable to say the least. If something goes awry during a reservation it might corrupt all the reservations for that resource. it's because it's architected to have both items for the reservations and 'free space'. If there is a gap (in time) between two items it won't work anymore. I have a quick and dirty tool to check for such a case. If you're interested ping me in private via the contact page. Otherwise it might be best to wait for RERv3 :)

Monday, 16 Feb 2009 08:00 by vlstest
Steven, Is that a way to change the lcid of your template from 1033 to 2057?

Tuesday, 17 Feb 2009 05:00 by Steven Van de Craen
vlstest, I believe KwizCom STP Language Converter claims to do that, but I have no experience with that tool.

Wednesday, 18 Feb 2009 05:08 by vlstest
thanks Steven, I tried the tools & can load the converted stp file to Site Template Gallery. However, that stp file is not showing at "Select a template\Custom" Tab when I tried to create a new site.

Monday, 23 Feb 2009 05:06 by vlstest
Steven, I have fixed the problem by editing the xml code in the webpart from "1033" to "2057"

Friday, 27 Feb 2009 08:39 by vlstest
Stephen, whenever a site member with "Contribution" right who delete or edit his reservation an error with event ID 6857 will log on Application event as below. However if he is assigned "Manage List" right the error will disappear. I cannot afford grant "Manage List" right to members. Do you have a fix? *** error on Application event log ***** "Error loading and running event receiver Ventigrate.SharePoint.ApplicationTemplates.ReservationEventHandler in RoomEquipmentReservationsV2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6c4a3c5f333742e. Additional information is below. : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Wednesday, 1 Apr 2009 02:43 by Bob
The original RER site template does not render the availability view correctly on browsers other than IE, which makes it pretty useless for us. Has this version attempted to address those browser incompatibility issues?

Wednesday, 1 Apr 2009 06:16 by Steven Van de Craen
Bob, I quickly gave up on that because it would take more time than I had at the time. So I'm afraid the answer is 'no'.

Friday, 3 Apr 2009 04:03 by Tony
Thanks you for your work Steven! Do you have any plans to update the Reservations:New Item page so that it has similar features as the standard SharePoint Calendar...specifically Recurrence and All Day Event?

Wednesday, 8 Apr 2009 08:26 by Steven Van de Craen
Hi Tony, I've looked into recurrency and it is just too complex to incorporate it. I am planning it for RERv3 but that project is currently only in my head ;)

Friday, 8 May 2009 03:09 by Moses
Great post Steven. Thanks for the code! I found this small article on codeproject.com that can help you along in implementing the recurrency feature: http://www.codeproject.com/KB/sharepoint/SharepointReservation.aspx. I hope it helps. A feature that would be great is if it would be possible to have a map with all the meeting rooms and just clicking on the desired room (like a map/picture with links) and check for its, and its resources, availability!

Monday, 25 May 2009 03:49 by Auri
Hi Steven, this is the solution that I was lookging for, but like commented by Stacie, it works opposite. If you reserve a resource from 9AM to 10 PM the resouce results booked for all the time, except from 9Am to 10PM. What I miss? Thanks in advance, Auri

Tuesday, 26 May 2009 03:02 by Auri
UPGRADE QUESTION: how can I upgrade an existing "Room Reservation Site" without creating it from scratch? p.s. I've solved the prevoius error by changing the regional settings Thanks, AM

Wednesday, 27 May 2009 01:05 by Steven Van de Craen
Auri, you could remove Microsoft's EventReceivers from the Resource and Reservation Lists and attach the ones in RERv2 if you like.

Thursday, 4 Jun 2009 02:00 by Dennis van Zoelen
Hello Steven, I installed the reservation solution to our sharepoint, and discovered the error when changing the resource. After some searching I found this page. I downloaded and installed it all, and it didn't work. Then I saw that the STP in the gallery said: "English", while we have a Dutch server running. Can I do something else to make it work on a Dutch server, or is it a quick fix for you to create a Dutch version ? Regards, Dennis.

Thursday, 16 Jul 2009 08:08 by Deepak
Hi Steven, I am facing an issue in RER template, i need to block duplicate reservation in this template. I used your attached code & modify it to avoid duplicate reservations. i used RERStatus field to determine if resource can be allocated or not. I then compiled this code & generated WSP & deployed it to my sharepoint site. I then associated event handlers with reservation list by adding one more element.xml with Receivers for genericlist(100) and provide it's refference in feature.xml's ElementManifest. I then checked site using sharepoint manager 2007, but was not able to find any entry for receiver of the list. Does this means that event handlers are still not attached. How can i confirm this thing? I have one more doubt, i have observed that when we add a request for a resource, two records are saved one with correct entries & one with no end date value. what is the reason behind this & how we can fix this. Thanks, Deepak

Thursday, 16 Jul 2009 06:57 by Deepak
Steevan: I understood working of RER, after adding one record for request, it adds on record for availablity with out date to make it available after that time. I also used sharepoint manager 2007 to check event receivers associated with RER. I have downloaded your project attached & modify it so that to avoid duplication in reservation by deploying its assembly in gac. I also created wsp file from solution file & deploy it but I am still not able to associate customized event recivers. Please help. Thanks.

Saturday, 18 Jul 2009 07:17 by Deepak
Hi Steevan, i was able to attach event handler to reservation list, but these event handler also got attached with resource & resource type list. How shall i avoid this? Thanks

Wednesday, 22 Jul 2009 09:01 by Steven Van de Craen
Deepak, how are you attaching ? Code ? Feature ? Make sure you target only the correct list(s) and not all of them (eg same type). You'll get better assistance on one of the SharePoint Forums for this issue.

Friday, 31 Jul 2009 10:35 by Eli
Hi steven thanks for this. but i think i might have missed a step in the installation process. In your initial instructions you have to add the 2 STP's to the application gallery of the site. but when i go to get the v2.stp it downloads a wsp. so i went ahead and added and deployed the original msft RER like you mentioned then i did: stsadmn add and deploy of your WSP then i created a site based on the only available RER template (under application templates); after the site was created i add the STP 1033 and still readded the WSP you provided. when i create a new site I only get 2 options the RER 1033stp and the template found in the "application" tab. i created a sub site using both templates and i cant get the reservation to look like your image at the top with the gantt style view and the check boxes.. Did I do something wrong since its not a stp anymore but a WSP? any help would be greatly appreciated. thanks again

Tuesday, 29 Sep 2009 10:22 by felipe
Hi Steven I have noticed that when my resources becomes too large (i.e. the lookup field within reservations list becomes too large), the html changes from something like: Card 1 Digital Camera 1 Laptop 1 Projector 1 TO
HOW DO I CHANGE THE NEWFORM.ASPX TO REFLECT THIS?

Tuesday, 4 Sep 2012 11:55 by Ian.T
Hi Steven, Any chance you could dust the cobwebs off this one please? I have a customer running WSS v3 with a couple of the Room Reservation systems running, albeit limited in functionality. I have been asked the question about importing data from a .csv file and tried several times without success. I have changed the visibility of the Status field, added rows to match the Available & Requested time slots, but the book a resource option is screwed. Is this likely to be the standard feature receivers playing tricks. Cheers, Ian

CAPTCHA Image Validation