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?


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.


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:



Use like this.

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

Follow this link to have more idea.


Ashish Chotalia

  • 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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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