[rt-users] Using AddValueForObject in scrip to update a 'select multiple' CF

Toby Darling darling at ccdc.cam.ac.uk
Tue May 13 09:47:37 EDT 2008


Hi

Has anyone got AddValueForObject working in a scrip with a 'select 
multiple' custom field?

my $cf_obj = RT::CustomField->new($self->CurrentUser);
$cf_obj->LoadByName( Name => "Product", Queue => '0',);
$RT::Logger->debug( "Loaded " . $cf_obj->Name() );
my $res = $cf_obj->AddValueForObject( Object => $self->TicketObj, 
Content => "Prod1" );
$RT::Logger->debug( "res = " . $res );
return 1;

The scrip fires, no errors in the log, Results pane gives me:

   "Prod1 is no longer a value for custom field product"

I'm using a base install of 3.6.1 on debian 4, but have updated 
CustomField_Overlay.pm and Interface/Web.pm to 3.6.6 versions trying to 
sort this.

Cheers
Toby

LEGAL NOTICE
Unless expressly stated otherwise, information contained in this
message is confidential. If this message is not intended for you,
please inform postmaster at ccdc.cam.ac.uk and delete the message.
The Cambridge Crystallographic Data Centre is a company Limited
by Guarantee and a Registered Charity.
Registered in England No. 2155347 Registered Charity No. 800579
Registered office 12 Union Road, Cambridge CB2 1EZ.



More information about the rt-users mailing list