[rt-users] Scrip condition, "On XxxxCustomFieldChanged"
Daniel Schwager
Daniel.Schwager at dtnet.de
Thu May 19 15:36:41 EDT 2011
Hi,
is there a change to get the custom field id by the CF name ?
my $fieldId =
$self->TransactionObj->getCustomFieldIdByName("CF-Summary");
I would like to replace the field number with the name
to make the code more robust.
-- <scrip> ----
### Trigger if custom value changed
return undef unless ( $self->TransactionObj->Type =~ /CustomField/i );
# Field 29: "CF-Summary"
# my $fieldId = $self->TransactionObj-> getCustomFieldIdByName
("CF-Summary");
my $fieldId = 29;
return undef unless ( $self->TransactionObj->Field == $fieldId );
-- </scrip> ----
Kind regards
Danny
More information about the rt-users
mailing list