Sharepoint itemupdating

The best solution would be if Share Point team would provide us with out-of-box events for content approval. The events might be : Content Approving Status Changing and Content Approving Status Changed and the event argument’s After Properties and Before Properties values could be filled with the the old value and new value of Content Approving Status field value.

sharepoint itemupdating-82

the actual Add / Update operation for which the Adding / Updating event is being fired).

Do NOT try to manually get the list item in code and update a property on it because the optimistic locking mechanism in Share Point may throw an error later on when the operation associated with the event to which you are responding attempts to complete.

Although asynchronous events expose a SPItem Event Properties parameter named properties just like their synchronous counterparts, remember that the operation has already completed so you cannot modify anything in the properties parameter (well, you can, but it doesn’t do anything).

Additionally, the properties parameter may not be populated with information that you would tend to expect to be present.

In Share Point 2010 new improvements are made for better event receiving management.

Few new event handlers are added for site, web, list, listitems etc.

We’ll develop a list item event receiver for Item Added and Item Updated events.

When a new item will be added it’s easy to identify item status and if the status is pending then we can send notification to all people in the approving team.

One major thing you should know about the SPItem Event Receiver class is that while you can implement multiple list item event handlers in a single class, Share Point instantiates a new instance of that class for each individual event it needs to handle.

Tags: , ,