As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<webscript kind="org.alfresco.repository.content.stream"> <shortname>Show Document</shortname> <description> Returns the content for a supplied node. </description> <url>/farthest-gate/get-pdf-rendition</url> <format default="html">extension</format> <authentication runas="system">none</authentication> <transaction>required</transaction> <family>Farthest Gate</family> </webscript>
function main(){ var nodeRef = args.noderef; // get the node from the reference if(nodeRef) { var doc = search.findNode(nodeRef); if (doc) { model.contentNode = doc; } else { status.code = 400; status.message = "Node " + nodeRef + " does not exist"; status.redirect = true; } } else { status.code = 404; status.message = "Noderef not given"; status.redirect = true; } } main();
dest.move(C:\Alfresco\alf_data\archive)
var query = '+PATH:"/app:company_home/cm:archive" +TYPE:"cm:folder"'; var queryDef = { query: query, language: "lucene" }; var qResult = search.query(queryDef); if (qResult.length == 1) { // If we had more that 1 returned, we have more than 1 archive folder which is a problem document.move(qResult[0].nodeRef); }