Sharepoint Event Receiver - A Useful Feature

102 30
SharePoint Event Receivers are a kind of a feature that caters to events of a site, list or even list item. Event Receivers are the MOSS version of the document event handlers. SharePoint Developers can use this feature of SharePoint Event Receivers for some type of events whether it is on a site or a list item. SharePoint Event Receive under SharePoint development can help in adding behaviors to different list items or even lists. SharePoint consultants use SharePoint Event Receiver to perform data validation and as well as to ensure complete data integrity. The various events related to the lists before are field adding, field updating and field deleting and afterwards are field added, field updated and field deleted.

Assigning Event Receivers to a list

SharePoint Event Receivers are bound through the usage of List Template Id that is ideally mentioned in the feature or sometimes directly added to the Event Receivers collection of a list. If the SharePoint developers are using the latter then it can even be performed utilizing a SPFeatureReceiver. SharePoint development uses feature receiver to custom code and execute once the feature has been installed, activated, deactivated as well as uninstalled.

Registering an event with the Event Receivers

When Sharepoint developers are working on an offshore SharePoint development project, they become aware that registering an event to which the Event Receiver will respond to will be subscribed using the feature file. Alternately, if the event receiver is tied to the list through code, one can specify it when adding the event handler through the utilization of enumeration of SPEventReceiver Type.

Using it before events

Even before an event is used, SharePoint consultants can cancel the task that has been executed and all that the SharePoint developers need to be careful about is to implement this particular behavior. SharePoint developers wouldn't like to involve users to modify a particular schema of a list or the criteria that failed when a new item has been added. Usually, the before events are also known as synchronous events and this tends to stop the flow of execution till the code that has been processed for the particular event handler has already run. These are commonly utilized to perform validation on the entered data to manage data integrity or even offer custom validation rules, which the front-end cannot provide.

Using it after events

Mostly, after events are asynchronous events and SharePoint consultants know that this wouldn't put a stop to the execution of the current flow. SharePoint developers know these are mostly used to kick off a business process.

Event Receivers in SharePoint 2010 enhancements

In SharePoint 2010, SharePoint developers get to utilize the benefits of event registration enhancement through which they are able to hook a particular SharePoint list to the event.
SharePoint developers can also enhance the privileges in the event receivers so that it is able to perform a series of tasks, which the present users who may have triggered the event do not have the permissions to do so.
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.