Can UpdateListItems or any other available SP2010 web service create a document set

Answered Can UpdateListItems or any other available SP2010 web service create a document set

  • miércoles, 08 de agosto de 2012 15:55
     
     

    I can easily create a new list item or in the example below a folder with code like...

                    updateService.Lists us = new updateService.Lists();
                    us.Credentials = SPWebServiceUserCredentials;
                    us.Url = SProotURL + siteName + "_vti_bin/lists.asmx";
                    XmlNode ndListView = us.GetListAndView(listName, "");
                    XmlDocument doc = new XmlDocument();
                    XmlElement batchElement = doc.CreateElement("Batch");
                    batchElement.SetAttribute("OnError", "Continue");
                    batchElement.SetAttribute("ListVersion", "1");
                    batchElement.InnerXml = "<Method ID='1' Cmd='New'>" +
                            "<Field Name='ID'>New</Field>" + "<Field Name='FSObjType'>1</Field>" +
                            "<Field Name='BaseName'>" + "New_Folder" + "</Field></Method>";

                    XmlNode ndReturn = us.UpdateListItems(listName, batchElement);

    But what I would really like to be able to do is create a document set, I thought about creating a folder and then updating it to be a set but although you can chnage the Content Type it still behaves as a folder "view" and not a Document Set... any ideas?

Todas las respuestas