cancel
Showing results for 
Search instead for 
Did you mean: 

How retrieve newly created node ?

lesignor
Champ in-the-making
Champ in-the-making
Hi,

I use Solr for indexing nodes instead of Lucene engine. I need to retrieve a newly created node in a webscript, and I just have the noderef of this node.

I can't use anymore luceneSearch() neither findnode() because of delay for indexing when using solr (notfound result).

Can you help me to find a way to retrieve this node from its noderef ? Is there an API, I can use  for this ?

Thanks for your help
Thierry
1 REPLY 1

ecarbenay
Star Contributor
Star Contributor
Hi Thierry,

you can use the function getNodeFromString (http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Utility_Functions - <a Href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/jscript/ScriptUtils.html#get...">Class ScriptUtils Function getNodeFromString</a>) :

  var myNode = utils.getNodeFromString(myNodeRef);