As I have explained in one of my earlier post that, there are 2 REST APIs to retrieve items from SharePoint: –
- Items – GET request and,
- GetItems – POST request. CAML query in the body.
In this post, I’ll be discussing about the latter.
Read More »
As I have explained in one of my earlier post that, there are 2 REST APIs to retrieve items from SharePoint: –
In this post, I’ll be discussing about the latter.
Read More »

In my, previous post, I had demonstrated how to get List Items using SharePoint REST API. In this post, we will see how to retrieve the following fields:
ClientContext ctx = new ClientContext(weburl);
ctx.Credentials = new SharePointOnlineCredentials(userName, passWord);
List list = ctx.Web.Lists.GetByTitle("ListTitle");
ListItem currentItem = list.GetItemById(1);
FieldLookupValue[] lookupFieldValCollection = new FieldLookupValue[3];FieldLookupValue lookupFieldA = new FieldLookupValue();
lookupFieldA.LookupId = 2;
lookupFieldValCollection.SetValue(lookupFieldA, 0);
FieldLookupValue lookupFieldB = new FieldLookupValue();
lookupFieldB.LookupId = 4;
lookupFieldValCollection.SetValue(lookupFieldB, 1);
FieldLookupValue lookupFieldC = new FieldLookupValue();
lookupFieldC.LookupId = 6;
lookupFieldValCollection.SetValue(lookupFieldC, 2);
currentItem["MultiLookupValCol"] = lookupFieldValCollection;
currentItem.Update();
ctx.ExecuteQuery();
Two important thing I would like to share here,
Finally, I can say that create the array of type FieldLookupValue and populate this array using its SetValue method only.