Update Error when updating metadata column on document set RRS feed

  • Question

  • Hi I'm creating a document set which has a metadata field. When I try the code below I get an error which says the item has been updated on Item Update line. Can anyone point me in the right direction? I tried properties.Add("MetaData", term) but nothing happens. Bear in mind I'm a total newbie.

        properties.Add("DocumentSetDescription", "New Document Set");//Populate the properties
        properties.Add("SupplierID", "SAGE001");
        DocumentSet newDocset = DocumentSet.Create(folder, "Docset1", docsetCT.Id, properties, true);
        var DocSetItem = newDocset.Item;
        TaxonomyField tfSet = (TaxonomyField)DocSetItem.Fields["MetaData"];
        tfSet.SetFieldValue(DocSetItem, term);

    Friday, March 25, 2011 2:06 PM

All replies

  • Hi,

    It's difficult to understand your issue because your code isn't clear. What is term, docsetCT, folder etc. Please post code snippet that can be compiled.


    Lightning Tools Check out our SharePoint tools and web parts
    Saturday, March 26, 2011 6:20 PM