cancel
Showing results for 
Search instead for 
Did you mean: 

Change property approveFolder of document

ndk
Champ in-the-making
Champ in-the-making
I use some scripts where i want to change the property "app:approveFolder" of a document.

I do it like this (in script):
document.properties["app:approveFolder"] = companyhome.childByNamePath(path);
where document = document i want to move to another folder.

Normally if i approve, the document goes to the folder i want.
if path is for example "/work/ICT" it works fine, but if i use a bigger path like "/work/ICT/programming/Manager" i have an error, he don't saves the path and document.properties["app:approveFolder"] is null…

so the error is:
Wrapped Exception (with status template): Failed to execute script workflowAction.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': Destination Node is a mandatory parameter

i'm sure the folder exists.

Does someone know what the problem is?
2 REPLIES 2

kbonnet
Champ in-the-making
Champ in-the-making
Not sure if i understand what you're trying to achieve. You're saving a node in the approveFolder properties? I don't see any instruction to move the  document to that folder. Maybe you didnt include all the script, but i dont see a move instruction.

Koen

lista
Star Contributor
Star Contributor
You really should post the entire script, in order to get meaningful answers.