I’ve an inventory which comprise 30 fields and I need to use all of them inside my distant occasion receiver, so as a substitute of manually loading the fields one after the other, I’m making an attempt to load all of the fields, I attempted the under code:
var objects = record.GetItems(question); clientContext.Load(objects, eachItem => eachItem.Embrace( merchandise => merchandise.FieldValuesAsText)); clientContext.ExecuteQuery();
and this code:
clientContext.Load(collListItem, objects => objects.Embrace( merchandise => merchandise.Id, merchandise => merchandise.DisplayName, merchandise => merchandise.HasUniqueRoleAssignments, merchandise => merchandise.Folder, merchandise => merchandise.File, merchandise => merchandise.ContentType )); clientContext.ExecuteQuery();
however when I attempt to retrieve a discipline, I’ll get an error:
The property or discipline has not been initialized. It has not been requested or the request has not been executed. It could should be explicitly requested
So can anybody recommendation on this please?