I have a scrip that checks to see if the value of several custom fields change. The intention is that if any one of the custom fields change it should execute the scrip action (in this case to send an email).
The problem I have is that the scip is executing once per identified change. i.e. if one of the custom fields change it calls the action once, but if three of the custom fields change it calls the action three times. I only want to call the action once regardless of how many custom fields change (i.e. if 1+ custom fields change, execute action once).
Any ideas on how to stop the action being called multiple times would be greatly appreciated.
This is my scrip:
Condition: User Defined
Action: Send Email
Template : FooBar Template
Stage: Transaction Create
my $Transaction = $self->TransactionObj;
return 0 unless ( $Transaction->Type eq ‘CustomField’
&& ( $Transaction->Field eq ‘35’ ||
$Transaction->Field eq ‘36’ ||
$Transaction->Field eq ‘37’ ||
$Transaction->Field eq ‘38’ )
There is nothing in the custom action fields.
Thanks for the help.