AnsweredAssumed Answered

Error while iterating a cmis result set within a webscript

Question asked by leonardo.celati on Apr 24, 2014
Latest reply on Apr 24, 2014 by leonardo.celati
I am in trouble with a simple task, basically I would like to iterate a CMIS result set within a web script, but a function not found error occurs.
This is the code:

var query = "…….";
var cmisConnection = cmis.getConnection();
var cmisSession = cmisConnection.getSession();
var results = cmisSession.query(query, false);

for(var res in results.iterator()) {
   var nodeRef = res.getPropertyValueById('cmis:objectId');
   var node = search.findNode(nodeRef);
   // …. rest of code….
}


I have already made sure that the result set is valid and filled with objects. The result is:

Cannot find function getPropertyValueById


Besides the main problem, I don't know if this fragment for retrieving the node is correct:


var nodeRef = res.getPropertyValueById('cmis:objectId');
var node = search.findNode(nodeRef);


Outcomes