SharePoint Calendar List: Restrict the entry of the second item with the same From and To date options

I want to restrict the entry of a new item to a sharepoint calendar list with the same name and dates for the same created user. Let me know that this can be done by accessing the sharepoint object model using C #.

Environment WSS3.0, MOSS 2007, C #

thank

0


source to share


1 answer


You will need to use a list event receiver and bind it to the ItemAdding event - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.itemadding.aspx

There is a good tutorial here: http://msdn.microsoft.com/en-us/library/bb736146.aspx



And a good tool for attaching an event receiver - http://lirliron.blogspot.com/2007/08/moss-list-event-receiver-register_08.html

You can check against To and From and see if it has an item with the listed one and if the corresponding SPItemEventProperties.Cancel is set.

0


source







All Articles