Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

sharepoint c# get list item query by lookup

CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View><Query><Where><Eq><FieldRef Name='yourColumn' LookupId='TRUE'/><Value Type='Lookup'>123</Value></Eq></Where></Query></View>";
List listByTitle = clientContext.Web.Lists.GetByTitle("YourListName");
ListItemCollection yourListItem = listByTitle.GetItems(camlQuery);

clientContext.Load(yourListItem);
clientContext.ExecuteQuery();
 
PREVIOUS NEXT
Tagged: #sharepoint #list #item #query #lookup
ADD COMMENT
Topic
Name
8+8 =