This commit is contained in:
Paula Quispe
2019-01-16 12:10:25 -04:00
parent 28105f8766
commit 8111550a7d
2 changed files with 12 additions and 8 deletions

View File

@@ -464,6 +464,8 @@ class PMScript
$sScript = "try {\n" . $sScript . "\n} catch (Exception \$oException) {\n " . " \$this->aFields['__ERROR__'] = utf8_encode(\$oException->getMessage());\n}";
$this->executeAndCatchErrors($sScript, $this->sScript);
//We get the affected_fields only if has the prefix
//@see https://wiki.processmaker.com/3.2/Triggers#Typing_rules_for_Case_Variables
$this->setVarsChanged($this->affected_fields);
$this->aFields["__VAR_CHANGED__"] = implode(",", $this->affected_fields);
for ($i = 0; $i < count($this->affected_fields); $i ++) {