0

Goal: Provide a direct subfolder link to the user to avoid navigating the library tree folder structure to access the document.

In order to get to the Library Sub Folder, I have had to do the following:

Step 1: Get Workspace ID

Select Id from ContentWorkspace where Name = 'Library Name'

Step 2: Get Root Folder ID

SELECT ContentFolderId, ParentEntityId, EnableFolderStatus FROM ContentFolderLink WHERE ParentEntityId = 'WORK_SPACE_ID'

Step 3: Get Sub Folders from Root Folder

SELECT Id,ContentSize, FileExtension, FileType, IsFolder, ParentContentFolderId, Title FROM ContentFolderItem WHERE ParentContentFolderId = 'CONTENT_FOLDER_ID'

Step 4: ContentFolderItem Get Request is

GET/services/data/v39.0/sobjects/ContentFolderItem/{Id}

In the community, I tried the following:

COMMUNITY_URL/s/sobjects/ContentFolderItem/{CONTENT_FOLDER_ID}

COMMUNITY_URL/s/ContentFolderItem/{CONTENT_FOLDER_ID}

COMMUNITY_URL/s/contentfolderitem/{CONTENT_FOLDER_ID}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.