SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have made a custom alerttemplate and tried to add the ItemID without success. I can add but i need to add post.aspx?ID=xx where xx is replaced by the ItemID.

Tried the following ID-s (and removed ID the properties in the exclude;ImmediateNotificationExcludedFields)

          <GetVar Name="ItemId" />
          <GetVar Name="ItemName" />
            <GetVar Name="{ListID}" />
            <GetVar Name="ID" />
            <GetVar Name="ItemName" />
            <GetVar Name="NewValue#ID" />

But I am not getting the ID's for the items. Any suggestions?

share|improve this question
up vote 0 down vote accepted

What you can do is to create a custom display form for the blog posts list or any other list. From this you can access the incoming url query string for the id and redirect to the correct post.aspx page.

share|improve this answer

Unfortunately ID is not supported in XML defined Alert Templates; you will need to use an IAlertNotifyHandler class to insert the ID as needed.

You can find out more on how to do this here:

share|improve this answer

Use like this.

<GetVar Name=”ItemID” URLEncodeAsURL=”TRUE” />

Follow this link to have more idea.


Ashish Chotalia

share|improve this answer
Are you 100% sure this works? I can not manage to reproduce. – HaavardMeling Jun 7 '11 at 12:37
I havn't tried on my local. I just came across this post and thought it may be useful. – ashish.chotalia Jun 7 '11 at 12:49

ItemID is invalid, SharePoint doesn't support ID for new items!, you have to remove ID from the 'excludelist' ion properties. all overall its just bad designed. I wrote a dll which parses body and subject and sends email, which is quite a pita, but works and seems to be the one and only solution to overcome this SP 'bug'. ...yes, i call it a BUG, because SP has ID property which will be OK when you edit a list item, but is 0 if you create a new one. bad!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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