How to rename Document Set programmatically

Hi guys,
I'm trying to create a Document Set item programmatically with unique name by adding ID to its name:
SPList list = SPContext.Current.List;
SPFolder parentFolder = list.RootFolder;
string dsname = Purpose_TextBox.Text;
Hashtable properties = new Hashtable();
properties.Add("DocumentSetDescription", "New Document Set");
SPContentType docsetCT = list.ContentTypes["RequestPayCT"];
DocumentSet docSet = DocumentSet.Create(parentFolder, dsname, docsetCT.Id.Parent, properties, false);
DocumentSet ds = DocumentSet.GetDocumentSet(list.GetItemById(docSet.Item.ID).Folder);
ds.Item.Name = ds.Item.Name + ds.Item.ID.ToString();
The problem is that I cannot update Document Set name.
What do I miss?

Please check the below article
http://sharepoint.stackexchange.com/questions/14661/rename-document-set-through-code
set.Item[SPBuiltInFieldId.Title] = newDsName;
set.Item.Update(); //or SystemUpdate(false)

Similar Messages

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to rename OBIEE reports programmatically?

    Hi,
    We have OBIEE webcat of several hundred reports. Recently we have to rename 150 reports according to latest requirement. Instead of doing this manually, is there a way to rename reports programmatically? Is there sample codes I can follow? I'm using OBIEE 10.1.3.4.
    Thanks for your help.
    Wei

    I am not aware of any existing api to do that except webservices api. This one is however flexible enough and well documented
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31769.pdf
    You can code your webservices calls in any language your choice (java,python,any other what you are skilled in) - here is a very basic example in plsql:
    declare
      l_envelope      varchar2(32767);
      l_http_request  utl_http.req;
      l_http_response utl_http.resp;
      l_url           varchar2(1000);
      x_envelope      xmltype;
      l_sessionid     varchar2(1000);
      l_src           varchar2(1000);
      l_tgt           varchar2(1000);
    begin
      -- Get session id
      l_url      := 'http://zajin:7003/analytics01/saw.dll?SoapImpl=nQSessionService';
      l_envelope := '
    <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      xmlns:v5="com.siebel.analytics.web/soap/v5" >
       <soapenv:Header/>
       <soapenv:Body>
          <v5:logon>
             <v5:name>Administrator</v5:name>
             <v5:password>Administrator</v5:password>
          </v5:logon>
       </soapenv:Body>
    </soapenv:Envelope>
      l_http_request := utl_http.begin_request(l_url, 'POST', 'HTTP/1.0');
      utl_http.set_header(l_http_request, 'Content-Type', 'text/xml');
      utl_http.set_header(l_http_request, 'Content-Length', length(l_envelope));
      utl_http.write_text(l_http_request, l_envelope);
      l_http_response := utl_http.get_response(l_http_request);
      utl_http.read_text(l_http_response, l_envelope);
      utl_http.end_response(l_http_response);
      x_envelope := xmltype(l_envelope);
      select extractvalue(x_envelope,
                           '/soap:Envelope/soap:Body/sawsoap:logonResult/sawsoap:sessionID',
                           'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:sawsoap="com.siebel.analytics.web/soap/v5"')
        into l_sessionid
        from dual;
      -- Based on the obtained session handler
      -- rename requests i.e. move from l_src to l_tgt
      l_src := '/shared/Sample Sales/01 Ranking and Toppers/Multi-Dims Top Ns';
      l_tgt := '/shared/Sample Sales/01 Ranking and Toppers/Multi-Dims Best Ranked';
      l_url      := 'http://zajin:7003/analytics01/saw.dll?SoapImpl=webCatalogService';
      l_envelope := '
    <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      xmlns:v5="com.siebel.analytics.web/soap/v5" >
       <soapenv:Header/>
       <soapenv:Body>
          <v5:moveItem>
             <v5:pathSrc>' || l_src || '</v5:pathSrc>
             <v5:pathDest>' || l_tgt || '</v5:pathDest>
             <v5:sessionID>' || l_sessionid || '</v5:sessionID>
          </v5:moveItem>
       </soapenv:Body>
    </soapenv:Envelope>
      l_http_request := utl_http.begin_request(l_url, 'POST', 'HTTP/1.0');
      utl_http.set_header(l_http_request, 'Content-Type', 'text/xml');
      utl_http.set_header(l_http_request, 'Content-Length', length(l_envelope));
      utl_http.write_text(l_http_request, l_envelope);
      l_http_response := utl_http.get_response(l_http_request);
      utl_http.read_text(l_http_response, l_envelope);
      utl_http.end_response(l_http_response);
    end;With similar calls you can rename any items in your catalog, but you should be aware, if original items are referenced somewhere, those references have to be modified accordingly ( so, a lot of xml parsing may be required), of course, before you try to do it programmatically, you should probably backup your catalog.
    Best regards
    Maxim
    http://comsysto.wordpress.com/

  • How to add a file in Document Set using ECMA script?

    Hi,
    I want to upload a particular file into Document set using ECMA script.
    I can do it easily through C# but unable to achieve the same using ECMA Script.
    Any pointers or piece of code will be helpful.
    Thanx in advance :)
    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"

    The following blog post provides a way to create a document set using ECMA:
    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
    The following blog post provides a way to upload files into a document set using CSOM:
    http://www.c-sharpcorner.com/Blogs/12139/how-to-create-document-set-using-csom-in-sharepoint-2013.aspx
    See if you can follow the logic in the CSOM example to apply it to ECMA. Let me know if you have specific problems with it.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • SharePoint 2013 List & linked Document Set Project Help Needed

    I have struggling to find the best solution for a recent project. I'm sure someone will have a better suggestion than what I have come up with.
    Project Requests
    Project Tracking and Documents
    Status and other data
    Project Documents
    Offsite Syncing for active projects (SkyDrive Pro)
    Attempted Scenario
    1 List for Project Tracking
    1 Document Library for Project Documents (Document Set content type)
    I created a workflow to automatically create a new Document Set when an item was added to the list, then create a link to the Document set in a column called Documents. The goal with the document sets is to have them sent to another library (archive) when
    the project is marked complete. The reason is so that the user synching offline won't have so many document sets to sync or to browse through (there would easily be a few hundred within a couple of months)
    Is there a way to programmatically move the document set to an archive library when the list item status is set to complete?  And if the status were to change back to active, to move back to the active library. 
    Or maybe I am going about this the wrong way entirely?  All suggestions are greatly appreciated! 

    Hi,
    With Event Receiver, we can capture the ItemUpdated event of item of a list when the value of an item is updated, then perform the Document Set moving accordingly.
    Here is a step by step sample on creating a simple Item added event receiver for Custom List in SharePoint 2010:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    More information on
    Event Receiver for your reference:
    http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/ff408183(v=office.14).aspx
    Here is a thread with code demo about
    moving Document Set programmatically:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/1e8b1110-a719-4825-a300-cc1946f4d96a/document-sets-move-programatically
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • 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

  • SharePoint Document Set Version Extension

    Before reading further, please note this is not a simple 'how do I enable versioning' and, as far as I can tell, nothing similar has been asked before...
    Instead I am looking for any solutions (3rd party or OOTB) or novel suggestions for an extension to document set versions so that users are presented with a friendlier user interface than the default version history dialogue that we all know and love.  
    This is a very specific request from a senior stakeholder at my company who requires the highlighting/comparison of document set versions in which we are already displaying a custom ASPX page of properties and lookups against other data in the site. The
    user has previously used (and most likely prefers) the Atlassian Confluence offering (https://www.atlassian.com/software/confluence) which provides such functionality.
    So far I have explored the following no code solutions:
    Allowing users to track their own changes through Word and then uploading the document to the correct document set. This is not an option due to the number of clicks users have to navigate through and the loss of centralised tracking etc. through the doc
    set properties
    Providing users with the ability to mark their changes in the document set with rich text highlighting (has to be enabled through SPD for document sets) which was initially promising but places the reliance on users to remember to highlight changes correctly.
    I have also noticed a frustrating feature with version control which, in the history dialogue box, properties with a large number of characters (we have extended most fields to be greater than 250 - I know this is probably not recommended but needed to be
    done) are clipped so that the entire field is not visible. Through PowerShell I can see that the values are fully stored in the Snapshot Collection for each document set.
    Currently, I am working on the assumption that this is the only way to access version history and a custom server side solution (CSOM doesn't seem to expose these properties) will be the only option going forward. Ideally a no-code option (especially not
    server side) would be preferable so reaching out to you wonderful experts for some insights.
    Really appreciate any responses...

    Hi,
    Based on your description, my understanding is that you want to make the Document Set Version history with a friendlier user interface than the default version history dialogue.
    SharePoint seems to only expose the Document Set's metadata version in the "Version" column. I call this the metadata version because this will only increase if you make changes to the document set's properties, and not if you update the documents
    inside. This is what I mean by metadata version.
    In the Document Set Version history,  the first column displayed is No. This is not the regular version column of the library, but a totally different one. When creating a document set version the version column of the library doesn’t change,
    only the No value.   
    The version(s) of a document set are stored in the propertybag of the item itself. 
    Take a look at this article about how to retrieve document set version history:
    http://www.itidea.nl/index.php/how-to-retrieve-document-set-version-history/
    Best Regards,
    Lisa Chen
    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]
    Lisa Chen
    TechNet Community Support

  • Document Set custom content type - welcome page missing

    Sharepoint 2013. 404 error on welcome page for a following content type based on document
    set:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" Type="Note" RichText="false" NumLines="3" Group="pr41" Overwrite="TRUE" />
    <!-- Parent ContentType: Document Set (0x0120D520) -->
    <ContentType ID="0x0120D5200062FEFD4873814585B3EFD57010F1F8AE"
    Name="ContentType41"
    Group="Custom Content Types"
    Description="My Content Type"
    Inherits="FALSE"
    ProgId="SharePoint.DocumentSet"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" />
    </FieldRefs>
    <XmlDocuments>
    <XmlDocument
    NamespaceURI=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields">
    <wpFields:WelcomePageFields
    xmlns:wpFields=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields"
    LastModified="1/1/2010 08:00:00 AM">
    <WelcomePageField id="83729202-DCA7-4BF8-A75B-56DDDE53189C" />
    </wpFields:WelcomePageFields>
    </XmlDocument>
    </XmlDocuments>
    </ContentType>
    </Elements>
    Here's
    what i did after changing Inherits parameter to FALSE: 1) added ProgId parameter 2) added wpFields section 
    Any ideas?

    Hi,
    According to your post, my understanding is that you got an error while creating custom document set content type.
    The issue is that you set the Inherits=”FALSE” in the element. If you set the Inherits=”TRUE”, the content type would work.
    Based on the article form MSDN:
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed.
    The child content type does not have any fields that users have added to the parent content type.
    If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.
    It means if you set the Inherits to true, we would lose all our customization there.
    If we set Inherits="FALSE", which means you then have to remember to explicitly add into the definition all the stuff you should be inheriting, like the default Doc Set event receivers. 
    More reference:
    http://morefunthanapokeintheeye.blogspot.com/2012/10/how-to-successfully-provision-and.html
    http://ybbest.wordpress.com/2012/07/04/how-to-deploy-document-set-using-caml-in-sharepoint2010-solution-package/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • 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

  • How to display the contents of a document set on a page?

    I want to display the contents of a document set (that contains both folders and files) on a page (with the same structure as they are in the document set like folders and files). How to achieve this?
    I tried content search webpart but it is of no use as it displays the flat list instead I need folders and files as they are present in the document set
    I tried document set contents webpart but as it doesn't accept any connection, it is not of much use.
    I will be glad if you have any pointers for me in this regard.
    Regards
    Kesava

    Hi Kesava,
    According to your description, you might want to display the content in a document set with its hierarchy.
    How about using
    Page Viewer Web Part to display the page of the corresponding document set? This would be a non-code solution I would recommend.
    More information about Page Viewer Web Part:
    https://support.office.com/en-nz/article/Page-Viewer-Web-Part-e364436c-0ec4-4819-acac-1982b3525531
    Thanks
    Patrick Liang
    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]
    Patrick Liang
    TechNet Community Support

  • How to create a people picker type metadata in a document set?

    
    Hi folks,
    I want to create a people picker type metadata in a document
    set (it has some content types and it resides inside a library).
    So please help me knowing steps for creating it. 
    Our web application is using classic based authentication therefore I want to retrieve the names and groups in people picker column from Active Directory.
    Also, the document set library for which I want to create people picker metadata did not had document set before and documents where saved directly in content types as well as the metadata that now we are making as people picker was before of type Single line
    of text. 
    So, whether after creating it of type people picker, at the time of moving documents into document set, it will create problem? If yes,than of of what kind and how can it be resolved?
    Replies will be greatly appreciated.
    -Ishita

    Hi,
    From your description, I know you want to add a people picker column in a document set, then add this document set into a document library.
    If you want to add a people picker column in a document set you should create a document set first. You can know how to create and configure a document set by referring to this article: https://support.office.com/en-us/article/Create-and-configure-a-new-Document-Set-content-type-9db6d6dc-c23a-4dcd-a359-3e4bbbc47fc1.
    After creating a document set, you can follow these steps below to add a people picker column in a document set: click Site Actions -> Site Settings -> under  Galleries section, Site content types -> find the content you want to add people
    picker column -> under Columns section, Add from new site column -> Name and Type, enter your column name and choice Person or Group -> OK.
    If you move documents into document set, it will keep the current properties. You can edit properties to change the document to another content type which is  contained in the document set.
    In my case, DocA is the content type of the document library, Document and DocB are content types of the document set.
    If I have mis-understand, please let me know.
    Best Regards

  • How to rename the SharePoint Document Library existing file name using Web service

    Hi,
    How to rename the SharePoint Document Library existing file name using SharePoint Web service.
    Is it possible. How could i do it?
    Thanks & Regards
    Poomani Sankaran

    Hi,
    Lists.UpdateListItems Method
    would be helpful for your requirement.
    Here is a blog with code demo for your reference:
    http://blogs.msdn.com/b/knowledgecast/archive/2009/05/20/moss-using-the-list-web-service-to-rename-a-file.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to assign a unique number to the name column of a document set?

    How can I assign a unique number to the name column of a document set preferably with workflows? (Perhaps this number can increase by one each time a new document set is created)
    When a user attempts to create a new document set, this unique number should be already there as the name of the document set.
    (However, It seems that access and edit the Name column is more tricky than the other columns)

    Hi,
    To use document ID instead of Name column, you can
    Modify View and hide Name column. Then make Document ID to display at the left column.
    By default, document ID will be assigned to both document items and document sets. You may
    experience delay before you can see document ID assigned to existing document items and document sets because the scheduled document ID assignment timer jobs haven't finished yet.
    Miles LI TechNet Community Support

  • How to upload a document with values related to document properties in to document set at same time using Javascript object model

    Hi,
          Problem Description: Need to upload a document with values related to document properties using custom form in to document set using JavaScript Object Model.
        Kindly let me know any solutions.
    Thanks
    Razvi444

    The following code shows how to use REST/Ajax to upload a document to a document set.
    function uploadToDocumentSet(filename, content) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/add(url='" + filename + "',overwrite=true)?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': content,
    processData: false,
    timeout:1000000,
    'headers': {
    'accept': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val(),
    "content-length": content.byteLength
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err,textStatus,errorThrown) {
    dfd.reject(err);
    return dfd;
    Then when this code returns you can use the following to update the metadata of the new document.
    function updateMetadataNoVersion(fileUrl) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/getbyurl(url='" + fileUrl + "')/listitemallfields/validateupdatelistitem?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': JSON.stringify({
    'formValues': [
    '__metadata': { 'type': 'SP.ListItemFormUpdateValue' },
    'FieldName': 'Title',
    'FieldValue': 'My Title2'
    'bNewDocumentUpdate': true,
    'checkInComment': ''
    'headers': {
    'accept': 'application/json;odata=verbose',
    'content-type': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val()
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err) {
    dfd.reject(err);
    return dfd;
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • How to hide a column from document set?

    I have a document set in which i want to hide one of the columns, how do i proceed? is there any out-of-the-box features available? I want to show the column in main library view but not in document set. Any suggestions would be appreciated.
    Thanks
    Ramanjulu Naidu N

    You can hide the column in the content type to stop it showing in forms.
    Or you can go into Document Set settings (via the library settings page) to stop it being displayed on the Document Set homepage. 
    Does this cover the hiding you wanted to do?
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

Maybe you are looking for