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 am creating a workflow in visual studio. This is what i want it to do....when triggered by creation of a list item i want it to send an email to a permission group with a link in the body to the SPListItem. I have added the SendEmail activity, created fields for From, To, Subject, Body in the code behind and in the MethodInvoking event handler i have set the From, To, and Subject. I am hung up on the body....when i tried creating the email in SPD this is what i came up with

Click this link to be taken to the new file.

<a href='[%Current Item:%]' >New PPM Testplan</a>

I am not sure what to set the body to in order to achieve this/whether you can use the [%Current Item:%] syntax in the code behind. help or a link to doing this in VS2010 appreciated


share|improve this question
up vote 2 down vote accepted

To link back to your item, you can do something like

"<a href=\"" + li.Web.Url + "/" + li.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORM].Url + 
"?ID=" + li.ID.ToString() + "\">Link to Page</a>"

Where li is the SPListItem.


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.