Open smchargue opened 5 years ago
Add-PnPTaxonomyField seems to support setting the TaxonomyItemId to a Term Set Exclusively, not a Term.
this code
$term = Get-PnPTermSet -TermGroup $node.TermGroup -Identity $node.TermSet
returns a valid TermSet and then this code works.
$parameters.Add("TaxonomyItemId", $term.id) $field = Add-PnPTaxonomyField @parameters -ErrorAction Stop
However, this code, while it return a valid Term ,
$term = Get-PnPTerm -TermGroup $node.TermGroup -TermSet $node.TermSet -Identity $node.TermReference -Recursive
will fail with the same call.
with this message Add-PnPTaxonomyField : Object reference not set to an instance of an object on server. The object is associated with method GetTermSet.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Add-PnPTaxonomyField seems to support setting the TaxonomyItemId to a Term Set Exclusively, not a Term.
this code
returns a valid TermSet and then this code works.
However, this code, while it return a valid Term ,
will fail with the same call.
with this message Add-PnPTaxonomyField : Object reference not set to an instance of an object on server. The object is associated with method GetTermSet.