Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Error when updating Managed Meta data by PowerShell

$
0
0

The code breaks on the line:

  $MMSField.SetFieldValue($spItem,$Term)  

below

The error is 

multiple ambuiguos overloads found for SetFieldValue and the argument count:2

Any idea what is wrong? This is supposed to be the standard code.

(This is not a multivalued Taxonomy field)

#Cast to SPListItem to avoid ambiguous overload error
                 $spItem = [Microsoft.SharePoint.SPListItem]$listItem;
                
                 $MMSField = [Microsoft.SharePoint.Taxonomy.TaxonomyField]$spItem.Fields[$FieldName]
                            
 
                  $MMSField.SetFieldValue($spItem,$Term)  


faye fouladi



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>