Error Creating Document Set in a Custom Sandboxed Action

I created a custom workflow sandboxed action, and one of the lines is required to create a new document set in a document library.
The code works when i run it in a console application. The document set is created successfully. 
However, it doesn't in the workflow. Sadly since i am lost about how on earth it is to debug my custom action, all i get is error and nothing specifically.
i have been on this for over 10 hours now.
I would appreciate your help.
Thanks

Hi Anjorin,
The DocumentSet class is not available in Sandbox.
 You have to create a Farm solution.
If the class is available in sandbox class, you will find the description below in SDK.
Available in Sandboxed Solutions: Yes
http://msdn.microsoft.com/en-us/library/microsoft.office.documentmanagement.documentsets.documentset.aspx

Similar Messages

  • Create Document Set with custom Create Only permission set

    Here is the situation. We have a requirement where my customer wants to create document sets, however, document set/document level permissions are required.
    Setup: We created a new permission level called "Create Only". We then give the user Read and Create only permissions. This allows the user to theoretically create the item. We then run a Workflow on create that Replaces the permissions so that
    you are only allowed to view the ones you created along with other security groups based on their choices in the metadata fields.
    This setup works PERFECTLY when using a List or Form Library.
    However, for the life of me I cannot get it to work for Document Sets. If I have the same setup, I get an Access Denied message. However, it still creates the document set.
    What is weird, I've been playing around with custom permission levels and it seems as though the user has to have EDIT permissions at a minimum in order to create the document set. This will not work for me since I dynamically assign permissions to each
    document set based on what they select.
    As a side note, the only tool I have at my disposal is SharePoint Designer 2010.
    Does anyone know if there is an actual requirement to have EDIT permissions when creating a Document Set? Any input would be greatly appreciated.
    Alternatively, is there a way to setup permissions on a library for all NT Authenticated users so that we can give them the necessary permissions to create the Document Set, but still prevent them from see the other items and then the Workflow would set
    the permissions accordingly?
    I believe the more granular the permissions it uses those permissions instead so would this work?  I have not tested this theory yet.

    Hi,
    According to your description, my understanding is that you want to know if there is an actual requirement to have EDIT permissions when creating a Document Set and is there a way to setup permissions on a library for all NT Authenticated users and prevent
    them from seeing items created by others.
    For the first question, per my knowledge, if a user is given the Add Items permission, he/she can create a document set in SharePoint.
    However, there is an error “access denied” after the document set is created. It is due to the user has no permission to access the page which SharePoint will redirect the user to after finishing creating the document set.
    If the user is also given Edit Items permission, there will be no error when he/she create a document set.
    For the second question, I recommend to follow the link below to
    customize item permissions for each document submitted to a document library and remember to give the
    NT Authenticated users contribute permission.
    http://blogs.technet.com/b/spke/archive/2010/04/09/configure-item-level-permissions-for-document-libraries-sharepoint-2010-edition.aspx
    To grant permission to NT Authenticated users, please refer to the link below:
    http://office.microsoft.com/en-in/sharepoint-server-help/what-happened-to-add-all-authenticated-users-HA101805183.aspx
    Best regards.
    Thanks
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Create document set by workflow based on external list

    Hello,
    I'm wondering if the following is possible:
    I have a external list with all my projects.
    Next to that i have an document library where i place all the documents about the projects in document sets. Is it possible to automatically create the document sets based on the external list?
    So when a new record is created in the database (External list) it automatically creates a document set. (The document sets have an external data column which refers to the projects external data)
    I was thinking of an workflow, but i don't know how to accomplish this. I'm just a beginner with SharePoint.
    Kind regards,
    Robbert-Jan

    Hi Robbert ,
    According to your description, my understanding is that you want to create a document set for an external list in SharePoint 2013.
    For achieving your demand, you can refer to the article:
    http://msdn.microsoft.com/en-us/library/ff394479(v=office.14).aspx
    http://blogs.msdn.com/b/chandru/archive/2013/08/10/sp2013-creating-document-set-using-workflow.aspx
    One thing to notice is you cannot associate workflow with External List because workflow engine cannot run on back end system.
    Reference:
    http://siddiq-sharepoint2010.blogspot.in/2011/12/bussniess-connectivity-services.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Create Document Sets with Javascript COM - Sharepoint 2010

    I am trying to work out if it's possible to create Document Sets in a list using the Javascript COM.
    If it is possible does anyone have an example of how to do it. I am using Sharepoint 2010.
    Many thanks.

    Hi,
    after long seeking I found this solution:
    SPController.prototype.createTestDocumentSet = function(){
            if(this.clientContext === null) {
    alert("Share Point couldn't be loaded.");
    return false;
            var item = null;
            var oList = this.clientContext.get_web().get_lists().getByTitle('ListName');
            this.clientContext.load(oList);
            var itemCreateInfo = new SP.ListItemCreationInformation();
            itemCreateInfo.set_underlyingObjectType(SP.FileSystemObjectType.folder);
            itemCreateInfo.set_leafName('Haliluja Doc Set');
            item = oList.addItem(itemCreateInfo);
    item.set_item("ContentTypeId", "0x0120D520");
            //item.set_item('ContentType', 'Document Set');
            item.set_item('Title', 'Haliluja Doc Set');
            item.update();
            this.clientContext.load(item);
            this.clientContext.executeQueryAsync(function(){console.log("doc set created!");}, function(sender,args){console.log("keep working... "+args.get_message());});

  • Create Document Sets from template

    Our current functionality:  a document library is saved as a template.  When a user creates a new document library they created it from that template.  This ensures that all new document libraries consist of a pre-defined set of documents
    as a starting point.
    I'm looking into a Document Set solution.  My question is:  Is it possible to create a Document Set based on either an existing document set or an existing document library?  Basically, we have an initial set of documents that we would like
    to be included in all the new Document Sets created.  If they cannot be added at the time of creation, what would a power user need to do so that after an empty document set is created they would add a pre-defined set of documents from some other location
    in Sharepoint.  Basically, what I'm asking, is there something for Document Sets that is equivalent to:
    - exporting a document library as a template (with content)
    - creating a new document library based on that template
    except that I want to find out if something like this is possible for Document Sets
    thanks,

    What's a data set?
    For document sets you can create a custom content type and specify the default documents, metadata and so on. You can then use the Content Hub tooling to push that down to various subscriber site collections.

  • Create document set using ECMA Script

    Hi,
    I want to create a document set in SharePoint 2010 document library where i have already included document set content type.
    Is there any way to create a document set using ECMA Script?? If yes, then please provide the sample code for this...
    Thanks.
    -Prashant

    Hi Prashant,
    Although this post is aimed at SP 2013 and the App model, it should give you the object model references you need to complete your goal:
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    In particular the following function should be of use:
    function CreateDocumentSet() {
    var ctx = new SP.ClientContext("http://yourSharePointSite");
    var parentFolder;
    var newDocSetName = $('#txtGetDocumentSetName').val();
    var docSetContentTypeID = "0x0120D520";
    var web = ctx.get_web();
    var list = web.get_lists().getByTitle('DocSetLibrary');
    ctx.load(list);
    parentFolder = list.get_rootFolder();
    ctx.load(parentFolder);
    var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);
    ctx.load(docsetContentType);
    ctx.executeQueryAsync(function () {
    var isCreated = SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
    ctx.executeQueryAsync(SuccessHandler('Document Set creation successful'), FailureHandler("Document Set creation failed"));
    }, FailureHandler("Folder loading failed"));
    ctx.add_requestSucceeded(function () {
    $('#txtGetDocumentSetName').val('');
    alert('Request Succeeded');
    ctx.add_requestFailed(function (sender, args) {
    alert('Request failed: ' + args.get_message());
    // Failure Message Handler
    function FailureHandler(message) {
    return function (sender, args) {
    alert(message + ": " + args.get_message());
    // Success Message Handler
    function SuccessHandler(message) {
    return function () {
    alert(message);
    Keith Tuomi | Twitter: @itgroove_keith | Blog:
    http://yalla.itgroove.net
    Please click "Propose As Answer" if a post solves the problem or "Vote As Helpful" if a post has been useful to you.

  • SharePoint 2013 REST Create "document set" folder

    Hi,
    Is there a way in rest api model to create a "document set" folder into a Library?
    I have already created a folder through this code :
    body: { '__metadata': { 'type': 'SP.Folder' }, 'Name': 'New name' }
    Do i need to use another namespace ? Or do i add new properties into the body section ?
    Regards.

    Hi,
    you could see below a part of my code which works : a CRM's plugin create a document set on a SharePoint online document Library.
    I have to use the "/_vti_bin/listdata.svc" instead "_api". Don't forget to add the "Slug" header.
    try
    Uri spSite = new Uri(https://contoso.sharepoint.com/sites/MySite);
    SpoAuthUtility _spo= SpoAuthUtility.Create(spSite, "[email protected]", WebUtility.HtmlEncode("pwd"), false);
    var formDigest = _spo.GetRequestDigest();
    headers = new Dictionary<string, string>();
    headers.Add("X-RequestDigest", formDigest);
    headers.Add("Slug","https://contoso.sharepoint.com/sites/MySite/Projects/MyDocSetName|0x0120D520007A233E5B7896684DA77F0B084D0FE117">https://contoso.sharepoint.com/sites/MySite/Projects/MyDocSetName|0x0120D520007A233E5B7896684DA77F0B084D0FE117");
    restQuery = "/_vti_bin/listdata.svc/Projects";
    url = new Uri(String.Format("{0}/{1}", _spo.SiteUrl, restQuery));
    byte[] data = System.Text.Encoding.UTF8.GetBytes("");
    // Send a json odata request to SPO rest services byte[] result = HttpHelper.SendODataJsonRequest(
    url,
    "POST", // reading data from SP through the rest api
    data,
    (HttpWebRequest)HttpWebRequest.Create(url),
    _spo, // pass in the helper object
    headers
    catch (FaultException<OrganizationServiceFault> ex)
    throw new InvalidPluginExecutionException(ex.Message.ToString());
    Regards.
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • How to create attribute & set types with customer namespace COMM_ATTRSET?

    Hi CRM Gurus,
    I want to create some attributes and set types on CRM system with
    `/FITGL/` namespace but system is not allowed to create objects
    according. After debugging derives that SAP standart coding given below
    on LCOM_ATTRIBUTE_NEWF19 include.
    IF ( lv_systemname <> gc_sap_system ) AND
           ( iv_object_name(1) <> 'Y' AND iv_object_name(1) <> 'Z' ).
    Should we make an enhancement on this include? Is there any side
    efffects of this enhancement creating attribute & set types on CRM
    system during the packaging in terms of related with other attribute & set types objects?
    Kind Regards,
    Fahrettin

    Hi CRM Gurus,
    I want to create some attributes and set types on CRM system with
    `/FITGL/` namespace but system is not allowed to create objects
    according. After debugging derives that SAP standart coding given below
    on LCOM_ATTRIBUTE_NEWF19 include.
    IF ( lv_systemname <> gc_sap_system ) AND
           ( iv_object_name(1) <> 'Y' AND iv_object_name(1) <> 'Z' ).
    Should we make an enhancement on this include? Is there any side
    efffects of this enhancement creating attribute & set types on CRM
    system during the packaging in terms of related with other attribute & set types objects?
    Kind Regards,
    Fahrettin

  • Error creating document from using list using Document Template

    Hi All,
    I am trying to create a document from sharepoint list and upload it to a document library using item added and item updated event receiver methods. I can create metadata from list update in document library but unable to open the document. The error message
    I get is "we're sorry. we can't open "Filename" because we found a problem with its contents. no error detail available". Please see the below code.
    SPSecurity.RunWithElevatedPrivileges(delegate()
                       try
                           string TemplateUrl = string.Empty;
                           SPWeb web = properties.OpenWeb();
                           web.AllowUnsafeUpdates = true;
                           SPDocumentLibrary olist = web.Lists["NewLibList"] as SPDocumentLibrary;
                           String url = olist.RootFolder.ServerRelativeUrl.ToString();
                           SPFile file = null;
                           file = web.GetFile(olist.DocumentTemplateUrl);
                           if (file != null)
                               SPListItem oItems = properties.ListItem;
                               web.AllowUnsafeUpdates = true;
                               byte[] readStream = file.OpenBinary();
                               SPFile uploadedFile = olist.RootFolder.Files.Add("http://site/subsite/Libraryname/" + properties.ListItemId.ToString() + ".docx", readStream,
    true);
                               SPListItem listitem = uploadedFile.Item;
                               listitem["Firstname"] = oItems["Firstname"];
                               listitem["Lastname"] = oItems["Lastname"];
                               if (uploadedFile.CheckOutType != SPFile.SPCheckOutType.None)
                                   uploadedFile.CheckIn(string.Empty);
                               listitem.Update();
                               uploadedFile.Update();
                               web.AllowUnsafeUpdates = false;
                       catch (Exception ex)
                           EventLog.WriteEntry(EventLogName, ex.Message, EventLogEntryType.Error);

    Hi,
    Please try to use the code below:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    try
    string TemplateUrl = string.Empty;
    SPWeb web = properties.OpenWeb();
    web.AllowUnsafeUpdates = true;
    SPDocumentLibrary olist = web.Lists["NewLibList"] as SPDocumentLibrary;
    String url = olist.RootFolder.ServerRelativeUrl.ToString();
    SPFile file = null;
    file = web.GetFile(olist.DocumentTemplateUrl);
    if (file != null)
    SPListItem oItems = properties.ListItem;
    web.AllowUnsafeUpdates = true;
    Stream readStream = file.OpenBinaryStream(); //file is SPFile type
    SPFile uploadedFile = olist.RootFolder.Files.Add("http://site/subsite/Libraryname/" + properties.ListItemId.ToString() + ".docx", readStream, true);
    uploadedFile.CheckOut();
    SPListItem listitem = uploadedFile.Item;
    listitem["Firstname"] = oItems["Firstname"];
    listitem["Lastname"] = oItems["Lastname"];
    listitem.Update();
    uploadedFile.Update();
    uploadedFile.CheckIn(string.Empty);
    web.AllowUnsafeUpdates = false;
    catch (Exception ex)
    EventLog.WriteEntry(EventLogName, ex.Message, EventLogEntryType.Error);
    If the issue still exists, I suggest you dubug your code and check whether line of code error.
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Error creating and setting attributes on Childnode

    I'm trying to get my head around on how to dynamically create childnodes and attributes. I'm trying to create this structure.
    Target Structure
    <root node>
         + Parents (c=1..1, s=true)
         -- mother
         -- father
         -- + Children (c=0..n, s=false)
         ----- name
         ----- age
    I've written the sample code below.
    I get a  com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(.TestView.Parents): unknown attribute name
    when I try and execute   child1.setAttributeValue("name", "Madison");
    I suspect my problem is here
    IWDNode childElement = wdContext.getChildNode("Parents.Children",IWDNode.LEAD_SELECTION);
    because it returns null.
    What am I doing wrong
    Thanks for your help.
    /Greg
         // Dynamically create a context node
         IWDNodeInfo parents = wdContext.getNodeInfo().addChild(
                   "Parents",              // Name of node
                   null,                    // elementClass
                   true,                    // singleton
                   true,                  // mandatory                           
                   false,                 // multiple
                   true,                  // mandatorySelection
                   false,                 // multipleSelection
                   true,                  // initializeLeadSelection
                   null,
                   null,
                   null);
         parents.addAttribute("mother", "ddic:com.sap.dictionary.string");
         parents.addAttribute("father", "ddic:com.sap.dictionary.string");
        IWDNodeInfo children = wdContext.getChildNode("Parents",0).getNodeInfo().addChild(
                  "Children",            // Name of node
                   null,                    // elementClass
                   false,                    // singleton
                   true,                  // mandatory                           
                   true,                  // multiple
                   true,                  // mandatorySelection
                   false,                 // multipleSelection
                   true,                  // initializeLeadSelection
                   null,
                   null,
                   null);
         children.addAttribute("name", "ddic:com.sap.dictionary.string");
         children.addAttribute("age", "ddic:com.sap.dictionary.string");
            IWDNode parentElement = wdContext.getChildNode("Parents",0);        
        IWDNodeElement p = parentElement.createElement();
         p.setAttributeValue("mother", "Amy");
         p.setAttributeValue("father", "Greg");
        IWDNode childElement = wdContext.getChildNode("Parents.Children",IWDNode.LEAD_SELECTION);
         IWDNodeElement child1 = parentElement.createElement();
        child1.setAttributeValue("name", "Madison");
         child1.setAttributeValue("age", "2");
         IWDNodeElement child2 = parentElement.createElement();
         child2.setAttributeValue("name", "Peyton");
         child2.setAttributeValue("age", "1");
    Message was edited by:
            Greg Preston

    Hi Greg,
    it must be
    IWDNode parentNode = wdContext.getChildNode("Parents",0);
    IWDNodeElement p = parentNode.createElement();
    p.setAttributeValue("mother", "Amy");
    p.setAttributeValue("father", "Greg");
    parentNode.addElement(p);
    IWDNode childNode = parentNode.getChildNode("Children", IWDNode.LEAD_SELECTION);
    IWDNodeElement child1 = childNode.createElement();
    child1.setAttributeValue("name", "Madison");
    child1.setAttributeValue("age", "2");
    childNode.addElement(child1);
    IWDNodeElement child2 = childNode.createElement();
    child2.setAttributeValue("name", "Peyton");
    child2.setAttributeValue("age", "1");
    childNode.addElement(child2);

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • Document Set name as refiner in Search results?

    I'm wondering if there is a way to use the document set name as a refiner in a search results page so a user can search a specific site or document library and choose the document set name to narrow the results? Initially I thought I could create a
    shared column on the document set (in the properties of the document set type itself) which looked up or calculated the document set name and then this would be shared with the documents within the set. I couldn't find a way to get the name of the set.
    What would be the best way (if any), of getting the search results or document properties themselves (if I created a column which contained the document set name for e.g.) to show the document set (if populated) that the document belongs to?
    Document Library
    Document 1
    Document 2
    Document Set A
         Document A1
         Document A2
    Document Set B
         Document B1
    How can I get search results to show a refiner on Document A1 and A2 indicating they're in the same Document Set A? I realise I need crawled/managed property but how best should I set this up?
    If this is not possible can anyone suggest an alternative please?
    Many thanks!
    Scott

    Hi,
    I am afraid that there is no existing managed properties on the document which we can count on to know which document sets the document belongs to.  Just like what you said "created a column which contained the document set name", this could
    be a workaround to achieve what you want.
    To do that:
    1. Add a new site column named DocumentSetName and add it to
    DocumentSet Content Type. And give value "DocumentSet_A" for document set A and "DocumentSet_B" for document set B.
    2. In the Document Set settings, enable the newly added column as
    Shared Columns. It means that all documents added to this document set will share the column and its value.
    3. Reindex this document library.
    4. In the Search Results refiner, add the automatically created Managed Property
    as Refiner. 
    With this method, you can filter the documents with the name of document sets when searching office documents in search center. The only information you need input manually is Value of the site column.
    http://blogs.technet.com/b/sharepoint_made_easy/archive/2013/03/19/step-by-step-configuration-to-add-custom-refiners-in-the-refinement-panel-of-search-results-page-for-sharepoint-online.aspx
    Moreover, if you have the requirement to create batch of DocumentSets without any manual input, you can refer to the following link which explain how to create them with proper settings and default values.
    http://www.c-sharpcorner.com/Blogs/12139/how-to-create-document-set-using-csom-in-sharepoint-2013.aspx
    Miles LI TechNet Community Support

  • Allow user to change image of a document set

    Hello all,
    is it possible to allow user to upload and set an image in the welcome page of a document set ?
    For example, I want to create a document set for each customer, to store document related to this customer. In the document set welcome page, I would like to display the customer logo.
    Is it possible in a easy way ? :)
    Thank you !

    Hi David- automatically? No, unless you're ready for some major coding. Also, what permissions do you plan on giving the customer?
    The only way I can see this happening is if you provide the title for the image to your customer, then give them access to the library where it's stored and hope they use the exact title to replace the file that's there.
    cameron rautmann

  • Bulk Add Document Set

    Hello,
    Is there a way to bulk create document set in SharePoint? I saw mutliple way to bulk add "simple" items but I can't find a way to do this with document set (or better with my custom document set type)
    My target is to read an xml file containing IDs and create in a document library a document set for each entry..
    for now i'm using a web service that I call with PowerShell but it is too slow for me (I need to import a lot of document sets) ... is there a faster way?
    Thanks in advance
    Christopher
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

    I'm thinking, a faster way would be to leverage the client OM to upload files in batches. Each batch gets a little bit bigger because files get Base64 encoded, but according to my tests it's well worth the effort. In my case, I was able to make the
    code run 10 x faster. Here's some example code to get you started:
    // Run some kind of loop to add batch of files
    FileCreationInformation fileCreationInformation = new FileCreationInformation();
    byte[] content = fileContent;
    fileCreationInformation.Content = content;
    fileCreationInformation.Overwrite = true;
    fileCreationInformation.Url = fileName;
    this.CurrentList.RootFolder.Files.Add(fileCreationInformation);
    // End of loop, now execute in 1 batch:
    Context.ExecuteQuery();
    This code is for individual files, not for document sets, but I guess you'll be able to figure that out. I once built a tool that leverages the concept of batch uploading files, you can check that out as well at
    http://gallery.technet.microsoft.com/office/The-Migration-Dragon-for-c0880e59/view/Discussions
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Document Set Creation in document library using REST API in Sharepoint 2013

    Hi,
    I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
    REST API call. We need to create the document set along with metadata and upload the files inside the document set.
    I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
    Thank you,
    Mylsamy

    Hi,
    According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
    The REST API does not currently support working with Managed Metadata or Taxonomy fields.
    As a workaround, we can use the JavaScript Client Object Model.
    Create document set using JavaScript Client Object Model.
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
    Set managed metadata field with JavaScript Client Object Model.
    http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
    http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

Maybe you are looking for

  • Smartform : Main window : Want to increase the size of main window

    Dear Sir, In my smartform my Main window is fixed after four windows(2 + 2) but only in first page. Now my requirement is there in second page i am only showing two windows out of four and in new vaccent space produced by two window i wanted to incre

  • Gmail won't load after upgrade to 3.6.9

    Since upgrading to 3.6.9, gmail hangs while loading. The progress bar moves to 99% and then sits there. Gmail works in basic HTML mode, but not in normal JavaScript mode. Eventually, gmail time out and says "This is taking longer than usual". Looks l

  • ERROR 1402

    I have removed all Adobe from my computer and shut it down.  Start it back up, go to Adobe website and download Adobe Reader.  It runs through almost the entire process and gets to the last little bit and I get this: Error 1402 Could not open key HKE

  • Different trace files

    hi  forum i want to find out the paths for different trace files . ie where database trace files get stored, where workprocess trace files get stored?

  • Content server  configuration in  CSADMIN

    Hello Experts, i had install the  Content server 640/MaxDB 7.6on Solories platform . how to configure the CSADMIN in R/3 system . when we are adding the R/3 system , it need to mention  the HTTP script what i  need to mention in the field: HTTP scrip