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

Change MetaData field on a document programmatically

$
0
0

Hi

I've been struggling trying to write some C# code to programmatically upload documents to folders that have custom metadata columns - I can upload the documents fine and set columns that are simple text etc. However I don't seem to be able to set those that use metadata from the Term Store. The code I've been using looks like

item["colName"]=value;

...

item.Update();

ctx.ExecuteQuery();

where value has been the term's GUID, string value or varying combinations of "-1;#Value|[Guid]" etc etc. None of them work however.

Can anyone help with a concrete example?

Thanks


Viewing all articles
Browse latest Browse all 7589

Trending Articles