[rt-users] Set CustomField from scrip action

Nick Kartsioukas change+lists.rt at nightwind.net
Wed Apr 8 20:36:08 EDT 2009


Okay, I'm doing something wrong, and I'm just getting over a bad cold so
my brain isn't all here.  I'm trying to set a CustomField value from
within a scrip.  I've watched the debug output and the scrip is run, but
the CustomField value is still null.  CF is named 'createdbyemail', set
as a select one value type, with a possible value of 'yes'.  Scrip
action:

my $cf = RT::CustomField->new( $RT::SystemUser );
$cf->LoadByName( Name => 'createdbyemail' );
$self->TicketObj->AddCustomFieldValue( Field => $cf, Value => 'yes' );
return 1;

I can't even remember how I got started with this particular chunk of
code (I'm pretty sure I stole it from something in the contributed
scrips area of the wiki)...help would be appreciated.  Thanks!



More information about the rt-users mailing list