Skip to content

Conversation

@wuxiaojun514
Copy link
Contributor

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #4808

What is in this Pull Request ?

Currently Set-PnPListItem doesn't support term guid object for single taxonomy field, you have to convert it ToString() first, otherwise it cannot recognize it is guid and will try to run it as term path.

This is due to "value as string" cannot convert guid object to string, it will get null value. So I changed it to "value?.ToString()", the same one when handle multiple taxonomy field.

@KoenZomers
Copy link
Collaborator

Thanks @wuxiaojun514 !

@KoenZomers KoenZomers merged commit 2e1c34e into pnp:dev Apr 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Set-PnPListItem will get "Value cannot be null. (Parameter 'path')" error when you want to set taxonomy field with term id

3 participants