Validation rules, global transfer $fields problem
I'm building validation rules in a global transfer transaction. One of the rules is based on the ActionReasonId field. Even after the employee fills in this field, the variable doesn't always have a value. I have the impression that there's some delay and the rule fails.
Below is the log command:
const motivoAcao = $fields.actionOccurrences.ActionReasonId.$value();
console.log('1- motivoAcao: ', motivoAcao);
console.log(2-'motivoAcaoFields: ', $fields.actionOccurrences.ActionReasonId.$value());
In the first console.log, the variable doesn't have a value, but immediately afterwards I log the same field directly using $fields.
Does anyone know what's happening and if there's a way to solve this?
0