Hello
I want to create a Safety Goal with a script but the action in factory.js don't run and i have this erroneous message (attached file)
var toto =findOrCreateGoal(finder.getScope(), "name1", "id1");
same error if i use createElement function

function __createSafetyGoal(scope) {
if (!scope) {
console.error("Scope is undefined in create method!");
}
// create one
var op = new AddSafetyGoalOperation(scope, null);
op.clientExecute(null);
return op.getSafetyGoal();
}
line 307 is op.clientExecute(null);
thank you for your help