[rt-users] Accessing and updating a custom field in queue with perl API?

tobiasbp tobiasbp at gmail.com
Tue Oct 18 07:48:32 EDT 2011


Hello list.

I need to update a custom field for a queue using the perl API. I'm
running RT 3.8.8 on Debian stable.


I'm running through my queues. I want to access the value stored in
the custom field with id 5. The queue may or may not have the custom
field.

This code prints out the name of the custom field I'm interested in
for the relevant queues. I can not, however, figure out how to get to
the value stored in the field:

my $CFs = $queue_obj->CustomFields;
while (my $CF = $CFs->Next) {
  if ($CF->id == 5) {
    print $CF->Name . "\n";
  }
}

1. How do I the value stored in the field?
2. How can I update/change the value stored in the field?

Regards,
Tobias



More information about the rt-users mailing list