[rt-users] Accessing and updating a custom field in queue with perl API?
Kevin Falcone
falcone at bestpractical.com
Tue Oct 18 10:22:19 EDT 2011
On Tue, Oct 18, 2011 at 01:48:32PM +0200, tobiasbp wrote:
> 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?
Does $queue_obj->FirstCustomFieldValue(5); do what you want?
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111018/2ae3e578/attachment.sig>
More information about the rt-users
mailing list