AnsweredAssumed Answered

Dropbox Java Script // found solution

Question asked by thestorm on Aug 19, 2009
Latest reply on Aug 31, 2009 by jayjayecl
Hey people, I didnt find sth related to my problem so  I start a post, maybe some1 has more experience than me.

I have some custom propertys like customer (list) and I wanna make a JS for my dropbox that moves the document to the folder of the customer.

I have 2 Problems,

1. how to trigger a JS after i edited the properties (does on Update work here? Because Inbound triggers the script before i can set my properties)

2. how to use Paths in document.move i only found space.childByNamePath("SPACENAME") as destination but i wanna use sth like in lucene PATH:\"/app:company_home/cm:ComTeam/cm:Customer/PROPERTIE_OF_DOCUMENT" as destination

can any1 help me please?


Problem 1: On Update works fine for that, Script gets triggered after i modified properties

Problem 2: I started with following script, i get no error but it doesnt work

var Standard =["custom:AStandard"];
var Produkt =["custom:AProduktformat"];

var dest = companyhome.childByNamePath("ComTeam AG/Produktformate/" + Produkt);


cant see my mistake maybe some1???

Rule was broken, that script is working now for me:

var Produkt =["custom:AProduktformat"];
var Standard =["custom:AStandard"];
var Rahmen =["custom:ARahmen"];
var Kunde =["custom:AKunde"];
var Auftrag =["custom:AAuftrag"];

if (Standard == "Ja" && Rahmen == "Ja")

if (Standard == "Ja")
var Sziel = "ComTeam AG/Produktformate/" + Produkt;
var Sdest = companyhome.childByNamePath(Sziel);

if (Rahmen == "Ja")
var Rziel = "ComTeam AG/Kunden/" + Kunde + "/01 Rahmendokumente";
var Rdest = companyhome.childByNamePath(Rziel);

if (Standard == "Nein" && Rahmen == "Nein")
var Aziel = "ComTeam AG/Kunden/" + Kunde + "/02 Auftragsordner/" + Auftrag;
var Adest = companyhome.childByNamePath(Aziel);

////// onlything i need is sth like the alert() function to make a popup with information after script execution, some1 a hint?!