cancel
Showing results for 
Search instead for 
Did you mean: 

Crafting a script to run from a rule

jkrengel
Champ in-the-making
Champ in-the-making
I was using
var destFolder = companyhome.childByNamePath("Root/Pre_Press");

which for me was fine, but the end users that are uploading the files that get moved to that location by the end of the script don't have access to the company home.  They do have access to the Pre_Press folder, so I went to switch over to using:

var destFolder = findNode("workspace://SpacesStore/2f35be55-1c52-11dd-a1fc-a1ed4a8603ab");

This however didn't seem to work.  Am I doing it wrong?
2 REPLIES 2

frederick
Champ in-the-making
Champ in-the-making
Hi,

That code looks ok to me. Are you sure your users have write access to the destination folder?
Can you provide the error that is generated by your script?

Kind regards,

jkrengel
Champ in-the-making
Champ in-the-making
Here's the error I get:

Please correct the errors below then click OK.

A system error happened during the operation: Transaction didn't commit: Invalid company home path: /app:company_home - found: 0

Now I assumed it referred to the first line of code.  I haven't actually debugged it, but it's the only piece of code in the entire script that references the company_home location.  Which I find strange since I figured if I referenced the destination node directly it should not care about the company home.