Closed IllumiC closed 2 months ago
@IllumiC : did you check this https://pnp.github.io/pnpcore/using-the-sdk/listitems-fields.html#taxonomy-fields?
@jansenbe Thank you for your quick reply. I solved my issue with the help of the article you suggested.
IList.Items.AddAsync()
, pass key values of type (string, FieldTaxonomyValue).IFolder.Properties[]
, and instead use the keys of IFolder.ListItemAllFields[]
to pass a FieldTaxonomyValue
Category
Describe the bug
I have a column of type managed metadata that is configured to accept any term within a specific term set in my site. The column is used in various custom content types, of type (a) item, (b) document set, (c) document.
When creating an item via GUI, the term is applied successfully across all 4 content type scenarios.
When creating an item via Powershell PnP, the term is applied successfully across all 4 content type scenarios.
When creating an item via Core SDK PnP, I am experiencing difficulty.
Item
IList.Items.AddAsync()
and supply a dictionary. For the entry related to the term column, I use GUID.toString() for formatting.Document Set
IFolder.Properties
, followed byIFolder.Properties.UpdateAsync()
.Document
IFile.ListItemAllFields
, followed byIFile.ListItemAllFields.UpdateOverwriteVersionAsync()
.Steps to reproduce
Item
IList.Items.AddAsync()
Document Set
IFolder.Properties["Term_Internal_Name"]
, followed byIFolder.Properties.UpdateAsync()
Expected behavior
The term field is populated upon edit.
Environment details (development & target environment)