Monday, 30 June 2014

SPQuery Join

SPQuery query = new SPQuery();
query.Query = "[YOUR CAML QUERY HERE]";
query.Joins = "[YOUR JOIN CAML HERE (See above for example)]";
query.ViewFields = "[SAME AS BEFORE]";
SPListItemCollection items = myList.GetItems(query);
foreach(SPListItem item in items)