[rt-users] Setting Custom Field during Ticket creation in Perl API (4.0.2)
Srikumar Nair
srikumarp at fb.com
Mon Oct 17 18:33:36 EDT 2011
I am trying to set a Custom Field Value during the creation of a ticket with the following piece of code. But the value ("SN-1234") is not getting added to custom field
(BTW, I already pre created the Custom Field for the Ticket object and made it Global).
What am I doing wrong? Is SetIncludeContentForValue the correct API call?
=================
my $cf = RT::CustomField->new($RT::SystemUser);
$cf->Load('Store Number');
unless ($cf->id) {
$RT::Logger->error( "Couldn't load custom field " . "Store Number");
}
$cf->SetIncludeContentForValue ("SN-1234");
@retValues = $ticket->Create( Queue => 'My Store Queue', Subject => 'Test Ticket for Store 1234 ', CustomField => $cf);
=================
Thanks
~
~
~
~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111017/67c9f1dc/attachment.htm>
More information about the rt-users
mailing list