You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a SharePoint list, and I'm trying to retrieve all the items using both of the following approaches:
Option C: Using a CAML query via the LoadItemsByCamlQuery method.
Option D: Using a CAML query via the ListDataAsStream method.
I only have the view name that I need to retrieve data for. To fetch the items, I first try to get the View Query for that particular view. However, most of the time, the View Query returns as blank or empty. When I attempt to retrieve items using an empty CAML query, I receive all the metadata fields instead.
While iterating through the retrieved items, I encounter the error:
"Property 'Principal' was not yet loaded."
This happens even though I am not trying to access fields like ModifiedBy or Author.
How can I properly retrieve the items and avoid this error? Any help would be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a SharePoint list, and I'm trying to retrieve all the items using both of the following approaches:
Option C: Using a CAML query via the LoadItemsByCamlQuery method.
Option D: Using a CAML query via the ListDataAsStream method.
I only have the view name that I need to retrieve data for. To fetch the items, I first try to get the View Query for that particular view. However, most of the time, the View Query returns as blank or empty. When I attempt to retrieve items using an empty CAML query, I receive all the metadata fields instead.
While iterating through the retrieved items, I encounter the error:
"Property 'Principal' was not yet loaded."
This happens even though I am not trying to access fields like ModifiedBy or Author.
How can I properly retrieve the items and avoid this error? Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions