All, I am following the instructions from here (custom alert template) to set custom alert template for a list/library. I have a document library for which I would like custom alert email. Following are the steps I did:

  • Copy OOB alerttemplate.xml and name it alerttemplateTest.xml

  • Modified the existing template SPAlertTemplateType.DocumentLibrary

  • Added new template to new alerttemplateTest.xml (SPAlertTemplateType.DocumentLibrary.Test)

  • Ran the stsadm command:

     STSADM -o updatealerttemplates -url <http://urlname> -filename <your working copy filename>
  • Updated list.AlertTemplate to the new template (SPAlertTemplateType.DocumentLibrary.Test) for "Shared Documents" within a site through object model

For all the document libraries, the alert email reflect the changes i made in SPAlertTemplateType.DocumentLibrary. But the emails for Shared Documents I set to SPAlertTemplateType.DocumentLibrary.Test doesnt contain the changes. The emails contain changes for SPAlertTemplateType.DocumentLibrary. Through the object model, i can see that "Shared Documents" has the correct template, which is SPAlertTemplateType.DocumentLibrary.Test. Did i miss anything?

I appreciate any help on this.


1 Answer 1


It could be any one of a hundred issues with custom alerts, but one of the landmines is that existing alerts on the list still refer to the original template name of "SPAlertTemplateType.DocumentLibrary". Try creating a new alert and testing that.

If that works, then you will need to modify your code a bit to update existing alerts to use the new template.

  • I removed the existing subscription and created a new one and the alert emails picked up the right template! Thanks for your help! FYI for others, I have subscribed to the list before I updated the alert template and expected the existing subscription will use the new template. But the users will have to unsubscribe and resubscribe to get the emails with new alert template.
    – Emon
    Nov 9, 2011 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.