Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

4 Answers

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
add comment

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:

http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/14/how-to-customizing-alert-emails-using-ialertnotificationhandler.aspx

share|improve this answer
add comment

Use like this.

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

Follow this link to have more idea.

Thanks,

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
add comment

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
add comment

Your Answer

 
discard

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.