Get document comments by js or query

cancel
Showing results for 
Search instead for 
Did you mean: 
pjcaracuel_2349
Active Member II

Get document comments by js or query

Jump to solution

Hi folks,

Any way to retrieve the comments of a document using javascript or query?

B.R.

1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: Get document comments by js or query

Jump to solution

Document comments type if fmSmiley Tongueost.

To get all the comments for the document /app:company_home/app:shared/cm:file.txt, you can run a query similar to the following one:

var def = 
{ 
    query: "TYPE:'fm:post' AND PATH:'/app:company_home/app:shared/cm:file.txt//*'", 
    language: "fts-alfresco", 
}; 

logger.log(search.query(def));
Hyland Developer Evangelist

View solution in original post

1 Reply
angelborroy
Alfresco Employee

Re: Get document comments by js or query

Jump to solution

Document comments type if fmSmiley Tongueost.

To get all the comments for the document /app:company_home/app:shared/cm:file.txt, you can run a query similar to the following one:

var def = 
{ 
    query: "TYPE:'fm:post' AND PATH:'/app:company_home/app:shared/cm:file.txt//*'", 
    language: "fts-alfresco", 
}; 

logger.log(search.query(def));
Hyland Developer Evangelist