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

Update Taxonomy type field value, the API works different on office files(.docx, .pptx etc.) and other files(.txt ,.pdf etc.)

$
0
0

Hi all

I know there is a way to use the SPTaxonomyField to update the Taxonomy filed value.

But for a specific tool, I use the field name to update the field value directly. The user story is as following

End-user decide to upload a file to a SharePoint library with some field values.

Now the problem is just about the taxonomy type field.

When upload a non-office file, such as a .txt file, the taxonomy field value can be updated correctly.

spitem["taxonomy field"]="term label|term guid";

But for office file, such as .docx, it won't work, and i found out it need to update a corresponding note type field of the taxonomy field. like this

spitem["taxonomy field"]="term label|term guid";
spitem["taxonomy field_0"]="term label|term guid";

Does anyone know why need to update the corresponding note type filed for office files. And is the corresponding note type field always has the field name "xxx_0"?

Thanks a lot.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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