.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

How Alerts works in SharePoint 2010

Posted By:Jean Paul       Posted Date: January 23, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we can explore the underlying infrastructure of SharePoint Alerts. Let us analyze step-by-step what is happening in the background when we create an alert, an alert is triggered, email is sent etc.
 

In this article we can explore the underlying infrastructure of SharePoint Alerts. Let us analyze step-by-step what is happening in the background when we create an alert, an alert is triggered, email is sent etc.

What are Alerts?

SharePoint provides an excellent feature that notifies the users of changes of an item/library.

Uses can set alerts on:

  • Library / List
  • Document / Item

You can set alerts through the SharePoint user interface as in the following:

Alerts1.jpg

In order to see the preceding button, you need to set your Email Server in "Central Administration" > "System Settings" > "Configure outgoing e-mail settings".

Alerts2.jpg

Note: For receiving the emails triggered you can use a SharePoint Email Notification Tool like smtp4dev.

Create Alert

Now you are ready to create an alert & we can examine what happens in the database.



Open the database & you will see the following records in the ImmedSubscriptions table.

Alerts4.jpg

You will see that the ListId column is assigned a List GUID.

The table structure is as follows:

Alerts5.jpg

Note: You will see the database server & name through "Central Administration" > "Manage content databases" link.

If you have created a Summary Alert (daily or weekly) you will see the record was created inside SchedSubscriptions table.

The structure of the SchedSubscriptions table is:

Alerts6.jpg

Timer Job

Timer Jobs are responsible for building the Alert using a template & sending the Emails. We can see the timer job status through "Central Administration" > "Monitoring" > "Check job status" link.

Alerts7.jpg

Scrolling down, you will see the Timer Job for Immediate Alert.

Alerts8.jpg

You will see the Status of last execution there. In my case it has succeeded. Click on the link to see the settings as in the following:

Alerts9.jpg

In the preceding case the Timer Job is scheduled to run every 5 minutes. You can try clicking the Run Now button to trigger execution.


Alert Templates

The Timer Job creates the email content of the Alert Template file. We can modify the file, but copying & modifying is recommended. We can define a template in the list & library level.

The Alert template can be found in "14 hive" > "TEMPLATE" > "XML folder".

Alerts10.jpg

By default there are 2 templates - one for email & another for SMS. The alerttemplates.xml file contains around 10 thousand lines.

We can change the alert template through PowerShell & the STSADM commands.

References

http://bit.ly/10uiVpB 

Summary

In this article we have explored the activities & tables involved when working with SharePoint Alerts.


 Subscribe to Articles

     

Further Readings:

Responses
Author: Kaviya Balasubramanian         Company URL: http://www.dotnetspark.com
Posted Date: January 30, 2014

Thanks for your post Jean. Nice Article.

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend