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:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...