Sladescross's Blog

Blogging about Sharepoint related stuff

Taxonomy Field Update Through Lists.asmx January 26, 2012

Filed under: Lists.asmx,TaxonomyField Update Through Lists.asmx — sladescross @ 5:20 pm

http://blogs.msdn.com/b/sridhara/archive/2010/07/09/update-taxonomy-field-values-in-a-list-item-through-sharepoint-web-services.aspx

At microsoft’s recomendations we changed the code to update BOTH the fields for an MMS field as shown below :-

batchElement.InnerXml = “<Method ID=’1′ Cmd=’Update’>”

+ “<Field Name=’ID’>3</Field>”

+ “<Field Name=’Title’>Modified through lists.asmx web service 1</Field>”

+ “<Field Name=’Country’>3;#Germany</Field>”

+ “<Field Name=’Continent’>2</Field>”

+ “<Field Name=’ContinentTaxHTField0′>0;#Northamerica|d511f3c7-377f-480f-aff6-beebecd3c675</Field>”

+ “</Method>”;

I also found that the pointer “<Field Name=’Continent’>2</Field>” could be set to 0 if the term was not already in the hidden list. ie “<Field Name=’Continent’>0</Field>”

 

Advertisement
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.