Discussion:
Link to List item In E-mail Body
(too old to reply)
MK
2008-08-11 16:58:00 UTC
Permalink
In my workflow, I am trying to include a link to the created SharePoint list
item in the body of an e-mail. If place the Encoded absolute URL in the
subject line, I get a webpage not found. I tried using the GUID in the body,
but I keep getting a Locate Link Browser dialogue box when I access the link.

Any suggestions on how I can include a link to list item (ID) in the body of
an e-mail?
Thanks
Mary Kay
500fifthave
2008-08-26 19:58:15 UTC
Permalink
MK

I keep a notepad file with a handy line like this

To View the Project click <a
href="http://spprod/IT/Lists/ProjectList/DispForm.aspx?ID=xxxxxxx">here</a>


Insert the doc id in place of "xxxxxxx'
Post by MK
In my workflow, I am trying to include a link to the created SharePoint list
item in the body of an e-mail. If place the Encoded absolute URL in the
subject line, I get a webpage not found. I tried using the GUID in the body,
but I keep getting a Locate Link Browser dialogue box when I access the link.
Any suggestions on how I can include a link to list item (ID) in the body of
an e-mail?
Thanks
Mary Kay
ravishankar ravi
2010-10-22 21:05:46 UTC
Permalink
SPWeb currentSite = SPControl.GetContextWeb(Context);
SPList lst = currentSite.Lists["Your List Name goes Here"];

// create a new item
SPListItem itm = lst.Items.Add();
//lst.Items[lst.Items.Count-1].ID;
// the request number

if(lst.Items.Count > 0 )
{
lstCurrentId=lst.Items[lst.Items.Count-1].ID + 1;
}
else
{
lstCurrentId=1;

}

//Use the below url and id for more


myMsg.Body = "<html><body style='font-family:arial; font-size:11;'>It Business survey Submission<br>"
+ "Finisar Site : "
+ "===============<br>"
+ "<br>" +"<br><a href='http://portalURLwithuptothelist/DispForm.aspx?ID=" + (lstCurrentId.ToString()) + "'>

above will gives the link to the current list item submitted

thanks
Post by MK
In my workflow, I am trying to include a link to the created SharePoint list
item in the body of an e-mail. If place the Encoded absolute URL in the
subject line, I get a webpage not found. I tried using the GUID in the body,
but I keep getting a Locate Link Browser dialogue box when I access the link.
Any suggestions on how I can include a link to list item (ID) in the body of
an e-mail?
Thanks
Mary Kay
Post by 500fifthave
MK
I keep a notepad file with a handy line like this
To View the Project click <a
href="http://spprod/IT/Lists/ProjectList/DispForm.aspx?ID=xxxxxxx">here</a>
Insert the doc id in place of "xxxxxxx'
Submitted via EggHeadCafe - Software Developer Portal of Choice
Silverlight 4 Martin Fractals with WriteableBitmapEx
http://www.eggheadcafe.com/tutorials/aspnet/d312fb6f-9610-449f-a191-26fcede58730/silverlight-4-martin-fractals-with-writeablebitmapex.aspx
Loading...