Showing posts with label SharePoint alert. Show all posts
Showing posts with label SharePoint alert. Show all posts

Customize WSS Alert template

Customize WSS Alert template

There are two way to customize wss alert template
(1) Modify the template file
the default template file is 12\TEMPLATE\XML\alerttemplates.xml. it's a CAML file. You can rewrite it and use stsadm to deploy it
STSADM -o updatealerttemplates -url -filename
(2) Using a class inherit for interface IAlertNotifyHandler. Put the implement of this class into custom alert template file, and then you can use stsadm to deploy it

The advantage of the first method is can to need deal with alert logic(it is implemented by SharePoint), but the CAML is very complex, and you can't edit complex logic.
The second method is very agility, but some feature of the alert template will lost(such as the email which alerts modified item can display which words were changed, which words were newly added.)

This paragraph written by WSS SDK group will give you a a minute description about this topic
http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx



Instead of stsadm, you can also use code to deploy alert template, like this:

string templateName="customTemplate1";
// Get the template of the web server
SPAlertTemplateCollection ats = new SPAlertTemplateCollection((SPWebService)( base.GetCurrentSPSite().WebApplication.Parent));

//add or modify the template
SPAlertTemplate t = ats[templateName];

if( t == null )
t = ats.Add();

t.Name = templateName;
t.Xml = xmlDoc.InnerXml;

t.Update();

// Set the alert template for each list separately
SPList list = someList ;
list.AlertTemplate = ats[templateName];
list.ParentWeb.AllowUnsafeUpdates = true;
list.Update();

a powerful SharePoint Alert tool--SharePoint Alert Reminder

SharePoint Alert provides Email-alert function but cannot fully meet users’ demands. SharePoint Alert Boost greatly extends default SharePoint Alert function and make the application of Alert more convenient. The new features are as follows:

1. Set alert conditions;
2. Customize email content;
3. Insert the columns into the alerts
4. Send email to non-SharePoint users or groups
5. Send email to the task-related users
6. Send item attachment as email attachment

Now, let’s turn to the following sample:
Director Henry assigned Tom a task for which the due date is 15th July. Meanwhile, a copy of description document is added to task item. When the task is completed, Henry would have a check. Email notification will be sent to task-related persons once meeting the following conditions:

Firstly, as long as Henry creates the task item, Email will be sent to Tom;
Secondly, send the item attachment as the email attachment
Thirdly, on the due date, a piece of Email will report to Henry;
Fourthly, Henry will receive a mail when the task is completed;

SharePoint Alert cannot achieve above requests, while SharePoint Alert Boost does work.

If the user wants to achieve the request as above referred, he can configure settings in sharepoint alert boost.
Add the requrired columns, such as director,assigned to, status, and so on. Then enter sharepoint alert workflow setting page, and create a new Alert Part. In the following steps, you can configure the main settings according to above request in releated area. For instance, customize Email subject and content, decide BCC to and Sent to, and set alert condition.

SharePoint Alert Reminder is now available for 30 days free trial, you can download it from:
http://www.sharepointboost.com/alertreminderboost.html