Document Set Homepage Url from CSOM file object

Using CSOM to access files contained within a document set, but unable to generate the url for the files Document Set home page:

http://my.domain.com/sitename/doclib/Form/CTName/docsethomepage.aspx?ID=ok&FolderCTID=ok&List=NO&RootFolder=ok&RecSrc=ok

The file object does not contain the CTName or List Guid.

Does an hidden property exist with the path to the home page?

February 20th, 2014 1:35am

You should be able to just link to http://my.domain.com/sitename/doclib/document set name directly and it will redirect the browser to the page.
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2014 1:46am

No redirect occurs just the folder view of the documents in the Document Set.  In SharePoint 2010 this redirect did occur, but not in SharePoint 2013.

You must explicitly reference the docsethomepage.aspx page to see Document Set properties.

The CSOM object is missing two required elements, so cannot generate without other ExecuteQuery operations.

A bit silly.

February 21st, 2014 3:28pm

The redirect handler in SharePoint 2013 is not the folder path.

Instead the link can be created in CSOM using:

oWeb.get_serverRelativeUrl() + "/_layouts/15/DocSetHome.aspx?id=" + escape(fields.FileDirRef)

where fields = file.get_listItemAllFields().get_fieldValues()

  • Marked as answer by MULTISY 14 hours 47 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2014 4:20pm

Thanks for sharing the solution! I'm sorry that I still had my head in 2010-land.
February 21st, 2014 7:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics