I have a list which contain 30 fields and I want to use them all inside my remote event receiver, so instead of manually loading the fields one by one, I am trying to load all the fields, I tried the below code:
var items = list.GetItems(query); clientContext.Load(items, eachItem => eachItem.Include( item => item.FieldValuesAsText)); clientContext.ExecuteQuery();
and this code:
clientContext.Load(collListItem, items => items.Include( item => item.Id, item => item.DisplayName, item => item.HasUniqueRoleAssignments, item => item.Folder, item => item.File, item => item.ContentType )); clientContext.ExecuteQuery();
but when I try to retrieve a field, I will get an error:
The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested
So can anyone advice on this please?