I am using Sharepoint 2013 ECM to upload new document sets to a list programatically in VB.NET/C#
I am successfully creating the document set, but can not find any documentation on how to add the properties/metadata to that uploaded document set. The Folder the document set will upload to already has the properties pre-defined. I just need to set them.
The code below creates the new document set. But there is zero information I can find on the internet on how to add properties from this. Sharepoint 2010 libraries allow the DocumentSet.Create to contain a properties field, but 2013 does not appear to.
Dim context As ClientContext = New ClientContext("URL")
context.Credentials = New NetworkCredential("Username", "Password")
'Get the document library in which the document set has to be created
Dim list As List = context.Web.Lists.GetById(New Guid("dc9e7aa5-5ac3-499c-a967-fa8f04bf1c90"))
'Get the parent folder where the document set has to be created
Dim parentFolder As Folder = list.RootFolder
'Get the "Document Set" content type by id (Document Set content type Id : 0x0120D520) for the document library
Dim ct As ContentType = context.Web.ContentTypes.GetById("0x0120D520")
context.Load(ct)
context.ExecuteQuery()
'Create a new document set
'A new document set will be created in "Documents" library as "Test Document" under which you can add the documents
DocumentSet.Create(context, parentFolder, dsName, ct.Id)
context.ExecuteQuery()