On Tue, Nov 04, 2014 at 02:42:57PM +0000, Chris Down wrote:
> Hello,
>
> In the Perl API, how do I get the names/values of all custom fields
> attached to a ticket? I looked at the documentation, but I only see
> ways to check for custom fields globally, not how to get a list of
> all the custom fields that apply to a single ticket.
>
my $Ticket = RT::Ticket->new( $CurrentUser );
$Ticket->Load(ID);
my $CustomFields = $Ticket->CustomFields;
while (my $CustomField = $CustomFields->Next) {
print $CustomField->Name.": ".$CustomField->Content."\n";
}
without testing, it should looks like this ;)
--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:[email protected] - http://www.easter-eggs.com
--
RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training