15

How to create a Document Set using SharePoint REST Interface The following example demonstrates how to create a Document Set in SharePoint 2013: function getListUrl(webUrl,listName,success, error) { var headers = {}; $.ajax({ url: webUrl + "/_api/lists/getbytitle('" + listName + "')/rootFolder?$select=ServerRelativeUrl", ...


8

Most probably the specified error occurs since you are trying to get site-level Content Type while web is not a root web. Quick fix Replace the line: var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); with: var docsetContentType = ctx.get_site().get_rootWeb().get_contentTypes().getById(docSetContentTypeID); How to create ...


7

var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle('Calendar'); var item = list.getItemById(121); item.resetRoleInheritance(); ctx.executeQueryAsync(function(){alert('success')},function(s,a){alert(a.get_message())}); if you are opening the OOTB EditForm from a link on your custom CEWP, execute the following code on ...


7

You can check if your item content type inherits from DocumentSet base content type that is 0x0120D520. Using C#: listItem.ContentTypeId.IsChildOf(new SPContentTypeId("0x0120D520")) or listItem.ContentTypeId.ToString().StartsWith("0x0120D520")


7

Please verify below things Go to site setting and features and make sure that the DocumentSet Feature is activated. Go to library setting and navigate to Advance setting and make sure that Allow Managed Content Type is set to true. Go to list settings and then assign Document Set content type to the library. As per your question it seems that you missed ...


5

Create a new custom Content Type with base as Document Set. Add the two Site columns Reference Number and Customer Name to that particular content type. In custom Document Set content Type , go to Document Set Settings and make the 2 columns as shared. Now all the documents inside the document set will share the value for that 2 columns. also go to the ...


5

Set the DocumentSet.Folder.Item.ProgId to "SharePoint.DocumentSet". Right now it will be empty. See this for more information: http://www.sharepointnadeem.com/2011/08/sharepoint-2010-document-sets.html UPDATE Here is the sample PowerShell code. I haven't however tested it: $web = Get-SPWeb http://yoursite $list = $web.Lists["YourList"] $docSetName = "...


5

Document management by metadata is the correct approach. I’ve worked both with Document Sets and without them. Document Sets have the benefit of storing documents that share one or more properties. They come in handy if you use a document library for storing multiple documents in an isolated environment. An example can be the use of marketing surveys records ...


5

You have to expand folder with $expand=Folder property and use ItemCount property of the folder like this: /_api/web/lists/getbytitle('your_list')/?items$select=ID,Title,Folder/ItemCount&$expand=Folder/ItemCount&$filter=FSObjType eq 1


5

I don't know how many projects will be created throughout the span of your application or the background of your requirement , but i would suggest an alternative plan of considering to make your Project as a sub site instead of Document Set, since you need a separate task list,risk list, site feed etc for each project. So alternative way would be : Create ...


5

Finally with the help of code given in this post I was able to achieve the task. The code which I used is: NetworkCredential creds = new NetworkCredential(userName, password, siteURL); ClientContext clientContext = new ClientContext(siteURL); clientContext.Credentials = creds; List list = clientContext.Web.Lists.GetByTitle("TestLibrary1"); ...


4

In 2013 (but not in 2010 as you say) you can nest Document Sets. So then the only differences is the fancy WelcomePage and the possibility to add Shared Metadata between the document set it self and all contained files. And as you write, the fact that you do not have version history on folders, but on Document Sets. More about document sets from TechNet ...


4

You can treat document sets as folders inside document library, it's the same idea, but you can do stuff with document sets that can't be done in folders. Document Set is a group of documents which are stored as one unit.A document library is a place which can hold individual documents or document sets. You can consider following point to choose between ...


4

You can move document sets either by using "Manage Content and Structure". Make sure use "Move To" actions in that, don't use copy, it will move document sets to another library without changing its document id. Another way is to do programmatically, in that case consider document sets as folder to move into another library where Migrate1 is document set ...


4

You might need to take a look at expanding the deferred call for ListItemAllFields. I had a similar situation and my call looked like this site/_api/web/GetFolderByServerRelativeUrl('/teams/lscsp-cat10/ManagementLibrary/ZCKNDY7XXYKP-15-3/')Files?$expand=ListItemAllFields Marc D Anderson's Blog - Get all SharePoint Document Library Files and Folders


4

Go back to Library Settings > Advanced and check "Allow management of Contemt types" and save. Back in Library Settings you can scroll down to Content Types and add a default Document Set Content Type (or a custom one). When you see the Document Set among Content Types in Library Settings - you will also see Document Set in the New button.


4

Yes, a Document Set is basically a folder. Here's an example for "Shared Documents" and a folder or doc set named "Toys". URL: https://yourServer/sites/training/demoworkflow/_api/web/GetFolderByServerRelativeUrl('Shared Documents/Toys')/ListItemAllFields Method: POST Headers: { "accept": "application/json;odata=verbose", "content-type": "...


3

Edit the library web part and change Toolbar Type to 'No Toolbar' This may not work in all cases, particularly if there are aspects of the toolbar you would like to keep.


3

My suggestion (explained at the bottom) is to just not use folders, then showing only specific groups of items in one view becomes quite easy. Alternatively you could use folder specific default metadata values, then filter your list view on those... otherwise you will probably need to install SPD or create a list view from scratch using HTML and JavaScript ...


3

You could probably tweak the library view to achieve this scenario. 1) Go to the library and click on create view in the ribbon. Click on 'All Documents View' under 'Start from Existing View' 2) Under 'Filter' Section set the following query using the drop downs Content Type = "Folder" AND Name = "Folder 1" OR Content Type != "Folder" 3) Create a ...


3

You can do it through the document set template. Every document set based content type has it's own "template" (in addition to the content type definition). Here's the MSDN documentation on the document set template class. Now, I don't know if you can do it declaratively through the Elements.xml files. The way I made it work was through code in a feature ...


3

If you want to manually navigate to the doc set, here's the correct URL: [site]/Applications/Forms/Application/docsethomepage.aspx?ID=4&FolderCTID=0x0120D52000097B2AAED9957E4CAD8855E43B2B0C6F00341030E5B70A6A4D9C605B8C48983359&List=3d911efd-eed7-4019-86c3-ed109b796891&RootFolder=[site]%2FApplications%2FTest%20app%202&RecSrc=[site]%...


3

You're retrieving the File Object, which only has 'Properties'. Metadata is defined on the Item. To view the Properties on that File, try adding '/Properties' to the end of the Query. To view the Metadata associated with the Item, try adding '/ListItemAllFields' to the end of the Query. i.e.: ~site/_api/web/GetFolderByServerRelativeUrl('/teams/lscsp-...


3

Your URL shouldn't have /Lists in it, since document sets are in a library, not a list.


3

SOLVED! Interesting that others are having this issue as well. My code stopped working yesterday 11/14/2016 around 5pm EST, was working perfectly fine for months until then. Anyways here's the solution based on some help from @Karthik 's response My code is very similar and fails with "unknown error" on the 3rd line: ContentType ct = currentWeb....


3

If you upload a file with an already existing filename in the document library, it will overwrite this, creating a new version. If you uncheck the option "Add as a new version to existing files" and upload a file with an already existing filename, the system will trigger an error and will not upload that file.


3

This can be done with the following jslink code: (function () { var linkFieldContext = {}; linkFieldContext.Templates = {}; linkFieldContext.Templates.Fields = { //TODO: //Change "DS" to the name of your lookup column "DS": { "View": DocumentSetLink } }; ...


3

The trick is to use the long id of the content type i.e use the content type id from the list. Not really sure, why the content type id at web level is not working. You can try either of the 3 options mentioned below: 1) Web oWeb = context.Site.RootWeb; context.Load(oWeb); context.ExecuteQuery(); var list = context.Web.Lists.GetByTitle("Documents"); ...


3

Have you tried using the Manage content and Structure option? Site settings Site Administration Manage content and structure Navigate to the folder you wish to move Select tick box and use the actions drop down Select the move option and then select the location to move to. If this doesn't work and you have the option of using third party software, ...


3

Yes, in theory this is possible. Though people have a tendency to find ways around restrictions! I'll explain. In your document library - check the content types, you'll want to have a Document Set and Document content type. In the Document Library Advanced Settings do not allow folders to be created. Even with these settings, if users use the 'open ...


Only top voted, non community-wiki answers of a minimum length are eligible