Freigeben über


Sharepoint : How to use Event List as resource organizer (Meeting Resource Organizer)

Out of box SharePoint 2003 doesnt support this functionality which is essential. I found a workaround and here I provide the details. Its little tricky, so if you miss any step, the functionality may not work. I have attached the sample files here.

1. Develop a sample web part code to write the details of event items in to the new item forms.

§ The code is attached here. Develop a webpart by using the attached code here.

§ https://msdn.microsoft.com/office/understanding/sharepoint/articles/default.aspx?pull=/library/en-us/odc_sp2003_ta/html/odc_wsswebparttips.asp

§ https://www.microsoft.com/downloads/details.aspx?familyid=CAC3E0D2-BEC1-494C-A74E-75936B88E3B5&displaylang=en

§ The code writes a hidden field with the values of Title, Begin, End and Room Detais. These values are sepeareted by $ sign and ; sign.

§ The sample data is 123$4/19/2006 12:00:00 AM$4/20/2006 12:00:00 AM$Room1;124$4/19/2006 12:00:00 AM$4/20/2006 12:00:00 AM$Room2;

2. Install the web part.

§ Download the Install Assemblies tool from the following link.

§ https://download.microsoft.com/download/7/0/c/70ccc7c9-bad4-4d6e-afc7-68a8048367f5/InstallAssemblies.zip

§ Note: The Tool has been provided as of is.

§ Open the Tool In SPS Machine.

§ Click Select Assemblies button and select the web part dll we created.

§ Click Install Button.

3. Add the web part into the Events List’s NewItem.aspx page

§ Click Favorites menu in the IE window

§ Select Add to favorites

§ In the name box, type “Add Web part – Browse”

§ Click Ok

§ Click Favorites menu

§ Right click on the “Add Web part – Browse” menu, select properties

§ In the URL type javascript:MSOTlPn_ShowToolPane('2')

§ Click OK

§ Go to the NewItem aspx page of the Event List

§ Select Favorites menu and click “Add Web part – Browse” menu

§ Drag and drop the “ResourceOrganizer” webpart from the “Virtual Server Gallery”

4. Add the attached JavaScript in the List Definition Schema.xml file

§ Go to c:\program files\common files\microsoft shared\web server extensions\60\template\1033\<Site Definition folder>\lists\<List Definition folder>

§ For e.g, c:\program files\common files\microsoft shared\web server extensions\60\template\1033\STS\lists\Events

§ But modifying the default site and list definition folders are not supported by Microsoft. So I would suggest you to create you own event list definition.

§ Open the schema.xml file and add the javacript attached here in the newform.aspx page.

§ The sample schema.xml file is attached here.

§ The JavaScript code checks the values in the hidden field with the selected values in the field. If the values are get matched then it pops up the window “The room is already booked”. Otherwise it will allow the user to book the room.

§ The name space values for the date and room fields are,

Start Date

OWS:EventDate:Date

OWS:EventDate:Hours

OWS:EventDate:Minutes

                              End Date

                                    OWS:EndDate:Date

                                    OWS:EndDate:Hours

                                    OWS:EndDate:Minutes

                              Room

                                    OWS:Room:Dropdown

§ The javacsript uses the above namespaces and check the values and pop up the alert message.

5. Restart IIS, add items to the list.

Important Points to be consider:

  • I have created a custom column for the event list, where the custom column name is Room. If you would like to change the column names, then replace the “Room” name with the column name in the webpart and in the JavaScript code.

  • The solution here I provided is, sample only and it only tested my machine. I would suggest you to modify the code accordingly and test the solution in your environment for your need.  

 

CodeSamples.zip

Comments

  • Anonymous
    June 12, 2006
    I am not sure what kind of problem you are facing. I suggest you to open a ticket in Microsoft PSS support.