How to get the set value of a custom field

I have a custom field for queues named “webhook”. How would I get the value (as text) that was set for a queue in a scrip Action? Some of the things I’ve tried:


my $cf = RT::CustomField->new( $RT::SystemUser );
$cf->LoadByName( Name => ‘webhook’, ObjectId => $queue, LookupType => ‘RT::Queue-RT::Ticket’);

Any pointers would be very much appreciated. I wanted to use a CF instead of hard-coding the webhook. Maybe there’s a better way to do this?

my $value = $self->TicketObj->QueueObj->FirstCustomFieldValue('Some CF');

That’s it. Thank you!