AnsweredAssumed Answered

ScriptAction.execute() produces error

Question asked by qwertz on Jul 3, 2017
Latest reply on Jul 3, 2017 by afaust


I am trying to perform a transformation.

var action = actions.create("transform");
action.parameters["destination-folder"] = folder;
action.parameters["assoc-type"] = "{}contains";
action.parameters["assoc-name"] = + "transformed";
action.parameters["mime-type"] = "text/html";
action.parameters["overwrite-copy"] = false;


This produces the following error on line 7:

org.mozilla.javascript.ConsString cannot be cast to org.alfresco.service.namespace.QName


I have read that one should change all JavaScript Strings with the .toString() method in order to resolve the issue and I tried this in the above example, but it still gives me the same error. Have I forgotten anything?