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
@randellhodges : it's currently not possible to immediately request the folder properties to load, but making a call after works fine. While checking your approach I've found a bug which I'll fix, but with the current bits below works
// Ensure the folder hiararchyvaraddedFolder=awaitparentFolder.EnsureFolderAsync("sub1/sub2/sub3/sub4/sub5");// Load the properties you need : WORKSaddedFolder=awaitcontext.Web.GetFolderByIdAsync(addedFolder.UniqueId, p =>p.Properties);// FAILS today, but will be fixedawaitaddedFolder.LoadAsync(p =>p.Name, p =>p.Properties);awaitaddedFolder.EnsurePropertiesAsync(p =>p.Properties);
@randellhodges : a fix has been added, with tomorrow's nightly build you'll be able to use the other approaches as well. Will close this issue now, please re-open or create a new one whenever things are still not working for you
Category
Describe the bug
Let's say I have the following path created in my sharepoint list
/Folder1
Run this code
The properties loaded are not for "Folder2" but for the last folder that wasn't created, in this case "Folder1".
I verified this by looking at the url in the debugger:
https://URL/sites/SITE/_api/Web/getFolderById('eda92902-5a83-44d8-abcc-466774812d14')?$select=UniqueId%2cProperties&$expand=Properties
eda92902-5a83-44d8-abcc-466774812d14 = Folder1
I did add a debug before the EnsurePropertiesAsync call to look at the UniqueId on folder and it is correct.
If I run the code a second time, everything works (because EnsureFolderAsync didn't create a folder).
I even tried folder.LoadAsync and still had the same issue.
Note: I'm not sure the SharePoint api supports it, but it would be nice to also include the properties to return at the time of creation.
Expected behavior
That the properties load for the folder specified
Environment details (development & target environment)
The text was updated successfully, but these errors were encountered: