Document sets can be used, when you want to group together documents within a particular library. Document set by itself is a content type, which acts as a folder at a high level. Apart from the logical grouping of the documents, we can also assign the metadata and assign Workflows to run on a group of documents. In addition to it, we can set the default content to a document set, so that whenever a document set is created, the default contents will be created along with it. This is quite helpful, as it gives a starting point to the team. Documents sets were introduced in SharePoint 2010 version and has made its way all the way till SharePoint 2016 came.

Document sets are part of a site collection feature.

Document sets

We can create document sets out of the box, as well as through SharePoint programming model. In this article, we will see, how we can create a Document Set, using JavaScript Object Model.

Internal Implementation

Let’s see, how we can implement it in SharePoint. Save the scripts, given above onto a text file and upload it to Site Assets library.

Output: The document set has been created in the library.

Output

Output

Summary

Thus, we have seen, how to create the Document Set, using JavaScript Object Model. This has been tried and tested in both SharePoint 2016 and Office 365.