sp-dev-docs
sp-dev-docs copied to clipboard
Getting File Version Custom Fields
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [ ] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- browser version
- SPFx version
- Node.js version
- etc
Issue description
Hi Guys,
I need to get whatever equivalent to the file ListItemAllFields ,ListItemAllFields/FieldValuesAsText but for file version. I tried something like this:
versions = file.versions.expand(["ListItemAllFields","ListItemAllFields/FieldValuesAsText","Fields"]).get()
ctx.load(versions)
ctx.execute_query()
but its not returning anything besides the system properties.
For files the following works and I get all fields:
files = list_source.files.expand(["ListItemAllFields","ListItemAllFields/FieldValuesAsText"]).get()
ctx.load(files)
ctx.execute_query()
Can you please help Thanks
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@VesaJuvonen ,
Any update on this ? please let me know