cancel
Showing results for 
Search instead for 
Did you mean: 

ReferenceError: 'avm' is not defined

rafalp75
Champ in-the-making
Champ in-the-making
Hi,

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

Could anyone help me with this issue?

Thanks Rafal
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
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.

Thanks,

Kevin

rafalp75
Champ in-the-making
Champ in-the-making
Thanks Kevin,

How could I miss that. Sorry bout that.

2. Do you have any examples how to use alfresco web services?

Rafal

P.S

But how is getting version list of certain object possible?
I just can check in object asigning as a version from java script.

kevinr
Star Contributor
Star Contributor
>But how is getting version list of certain object possible?

It's not in the API at present, it will be added in a future version.

Thanks,

Kevin