cancel
Showing results for 
Search instead for 
Did you mean: 

Rule 'run script'

msvoren
Champ in-the-making
Champ in-the-making
Hi,
I'm using Alfresco with source checked out few weeks ago.

I set a rule to execute script for all inbound items to space. Script simply adds string to file's name.

 
document.properties.name = "WORKS" + document.properties.name;
document.save();

The problem is - rule is not executed when I "Create content" or "Add content" in that space.

It executes if I paste a file in that space..   Is this a bug, or am I doing something wrong?

:shock:  :shock:
1 REPLY 1

msvoren
Champ in-the-making
Champ in-the-making
Actually, I was trying to move document from Uploading space to destination, considering document metadata.

I can't do that, because alfresco moves document before I insert metadata (when Adding existing content, you upload file, modify type, then click OK, alfresco saves docuemnt to that space, and later on gives you modify properties dialog..).

But when alfresco saves docuemnt to space, rule is executed, and script can't find metadata fields for that document..
anybody knows work-around?