Get ListItemAllFields after added file to a folder #380
-
Hello, I'm trying to add list item field while adding a file. I have this error
This my dummy code :
Do I need to recatch the file and load the ListItemAllFields or do i'm missing something? Thanks 😃 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You'll need to load ListItemAllFields that property is not expanded when doing an add. Add this line after the AddAsync call: await addedFile.ListItemAllFields.LoadAsync(); |
Beta Was this translation helpful? Give feedback.
-
It's working as expected. |
Beta Was this translation helpful? Give feedback.
It's working as expected.
Thank a lot