Friday, January 11, 2013

If BDC external data column has been added to a custom list, easiest way to retrieve an item using filter conditions is similar to

using

(MyWebDataContext context = new MyWebDataContext(SPContext.Current.Web.Url))

{


SPList myList = SPContext.Current.Web.Lists["My List Title"];


var myListResult = context.AthleteAppearances.Where(r => r.UniqueColumn == "filter value").FirstOrDefault();


if (myListResult != null && myListResult.Id.HasValue)

{


SPListItem myItem = myList.GetItemByIdAllFields(myListResult.Id.Value);


//Add your code to update the list item here

}
}
 

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...