cancel
Showing results for 
Search instead for 
Did you mean: 

Folder under site/documents library/document

brijeshnk
Star Contributor
Star Contributor

Hi there ,

can someone  please help me to find Javascript API for creating folder under site/document library/documents .
When I execute createFolder API it always creates folders under repository.

Apart from name ,  I can see one more parameter in createFolder Javascript API , does that helps me to create folder under document library / documents folder ? 

Example

var myfolder = userhome.createFolder("New Folder", "st:site");
 
In the above example , what exactly differentiate second parameter ?
2 ACCEPTED ANSWERS

angelborroy
Community Manager Community Manager
Community Manager

"userhome" is the root place where you are creating the folder. In your case, as you are using admin user, that means "repository".

Hope this sample helps you:

http://www.contcentric.com/create-folders-and-sub-folders-on-uploading-a-csv-file-in-alfresco/

Hyland Developer Evangelist

View answer in original post

brijeshnk
Star Contributor
Star Contributor

Solved , following script is what i used

companyhome.childByNamePath("Sites/YoutSite/documentLibrary/BusinessDocument/CLAIM")

View answer in original post

3 REPLIES 3

angelborroy
Community Manager Community Manager
Community Manager

"userhome" is the root place where you are creating the folder. In your case, as you are using admin user, that means "repository".

Hope this sample helps you:

http://www.contcentric.com/create-folders-and-sub-folders-on-uploading-a-csv-file-in-alfresco/

Hyland Developer Evangelist

brijeshnk
Star Contributor
Star Contributor

Solved , following script is what i used

companyhome.childByNamePath("Sites/YoutSite/documentLibrary/BusinessDocument/CLAIM")

EddieMay
World-Class Innovator
World-Class Innovator

@brijeshnk,

Glad you have a solution. Also thanks for posting your update - this will help others who have the same issue. 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!