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
When I try and get all the version history from a list item it doesn't contain any of the User lookup fields as part of it. these are being set on the create and when I look at the values on the main parent it has the values. I need to check if an item has been assigned to someone else.
Steps to reproduce
`
using var context = await _pnpContextFactory.GetContextAsyncForSite(url);
var myList = await context.Web.Lists.GetByTitleAsync(listName,
p => p.Title,
p => p.Items,
p => p.Fields,
p => p.Fields.QueryProperties(p => p.InternalName,
p => p.FieldTypeKind,
p => p.TypeAsString,
p => p.Title));
await myList.LoadListDataAsStreamAsync(new RenderListDataOptions()
{
RenderOptions = RenderListDataOptionsFlags.ListData
});
var foundItem = await myList.Items.GetByIdAsync(id, li => li.All, li => li.Versions);
Dictionary<int,object> items = new Dictionary<int, object>();
foreach (var version in foundItem.Versions.AsRequested())
{
var versionLabel = version.VersionLabel;
items.Add(version.VersionLabel.ToInteger(0), version.Values);
}
items.Add(items.Count + 1, foundItem.Values);
`
Expected behavior
Should show the user lookup fields within the version values.
@aidanbha79 : I can confirm that the lookup field is skipped when parsing the API call response, so clearly a bug. Will work on a fix. Thanks for using PnP Core SDK and reporting this issue.
@aidanbha79 : this has been fixed, please try again with the next nightly build (version 1.8.8 or higher). I'm closing this issue now, feel free to re-open in case the fix is not working for you.
Category
Describe the bug
When I try and get all the version history from a list item it doesn't contain any of the User lookup fields as part of it. these are being set on the create and when I look at the values on the main parent it has the values. I need to check if an item has been assigned to someone else.
Steps to reproduce
`
using var context = await _pnpContextFactory.GetContextAsyncForSite(url);
var myList = await context.Web.Lists.GetByTitleAsync(listName,
p => p.Title,
p => p.Items,
p => p.Fields,
p => p.Fields.QueryProperties(p => p.InternalName,
p => p.FieldTypeKind,
p => p.TypeAsString,
p => p.Title));
`
Expected behavior
Should show the user lookup fields within the version values.
Environment details (development & target environment)
Additional context
Thanks for your contribution! Sharing is caring.
The text was updated successfully, but these errors were encountered: