cancel
Showing results for 
Search instead for 
Did you mean: 

Got Error While running JAVASCRIPT from Web Client

unknown-user
Champ on-the-rise
Champ on-the-rise
DELETED
5 REPLIES 5

kevinr
Star Contributor
Star Contributor
How are you executing the script - via an action/rule or directly through a URL?

Thanks,

Kevin

unknown-user
Champ on-the-rise
Champ on-the-rise
DELETED

kevinr
Star Contributor
Star Contributor
OK, the "space" object should always be available for the Run Action for a document or space. Can you post your script?

Thanks,

Kevin

vbaudry
Champ in-the-making
Champ in-the-making
I got the same problem in 1.4 Preview …

When I run any script (via Run an action) which is using "alfresco" root vars, I got an error that says it's not defined.

Example :
The script
var modifiedDate = space.properties["modified"];

gives this error msg :
Failed to run Actions due to error: Failed to execute script 'workspace://SpacesStore/de788fbe-419f-11db-9efa-db905450cdd8': ReferenceError: "space" is not defined (AlfrescoScript#2)

Please Help !

Edit : This script works fine in 1.3

kevinr
Star Contributor
Star Contributor
Yep there is definitely a problem in 1.4 with this feature, I have raised a bug:
http://issues.alfresco.com/browse/AR-879

Thanks,

Kevin