I'm trying to run javascript for AVM (I've run example from http://wiki.alfresco.com/wiki/JavaScript_API#Search_API). I have following error: Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "avm" is not defined. (AlfrescoScript#39) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3226) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3216) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3289) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1567) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3161) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2250) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:149) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:160) at org.mozilla.javascript.Context.evaluateReader(Context.java:1163) at org.alfresco.repo.jscript.RhinoScriptService.executeScriptImpl(RhinoScriptService.java:244) … 40 more
I have installed Alfresco (Community Network): Current version 1.4.0 (build-105) schema 21
Please read the section at the very top of the wiki page:
IMPORTANT: This document details the JavaScript API and Script Services for Alfresco 2.1 - if you are looking for details on Alfresco 2.0 or 1.4 then please see this document: http://wiki.alfresco.com/wiki/JavaScript_API_For_Alfresco_1.4_and_2.0 Note that the old page will no longer be maintained or updated except to correct any mistakes.