Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
2
Newest
 Scholar
Impact
~800 people reached

  • 0 posts edited
  • 0 helpful flags
  • 0 votes cast
Aug
6
comment SharePoint: Move SPListItem inside folder to root and set lookup field value
public int get_ID(SPList list, string field, string itemname) { int id = 0; SPListItemCollection listItems = list.Items; foreach (SPListItem item in listItems) { if (item[field].ToString() == itemname.ToString()) id = item.ID; break; } return (id); } And then (NOT TESTED): string folder = sPListItem.Web.GetFolder(item.Url.Substring(0, item.Url.LastIndexOf('/'))).Name; sPListItem[regionInternalName] = get_ID(sourceList, "Title", folder);
Aug
6
awarded  Scholar
Aug
6
accepted SharePoint: Move SPListItem inside folder to root and set lookup field value
Aug
6
answered Mapping AD “member of” user property in sharepoint 2010 user profile properties
Aug
6
awarded  Autobiographer
Aug
6
asked SharePoint: Move SPListItem inside folder to root and set lookup field value