Search This Blog

Tuesday, January 5, 2016

How to get multi lookup values from SharePoint 2013 list item using LINQ

SPListItemCollection listitemcollection = lstActive.GetItems(query);
var ids = listitemcollection.Cast<SPListItem>().SelectMany(li => new SPFieldLookupValueCollection(Convert.ToString(li["Column1"])).Cast<SPFieldLookupValue>().Select(lv => lv.LookupValue)).ToArray();

No comments:

Post a Comment