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


1 Answer 1


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.


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.