I have a Custom Field I use as a “To” address for Others in a template; To:
This CF is a “Select One Value” type.
Now I have a situation that is similar, except that there will be more than
one address to use. I figured I’d define the CF as "Enter Multiple values"
and write a scrip to build those values. The email addresses would come from
This is what I have so far:
set up initial values
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
my $GroupName = “Test Group”;
set up Group Objects
my $GroupObj = RT::Group->new($RT::SystemUser);
get out if wrong Group
return 0 unless $GroupObj;
Walk thru Group and add an email address for that member
my $cf_name = “Test-Team”;
my $GroupMembersObj = $GroupObj->UserMembersObj;
while ($UserObj = $GroupMembersObj->Next)
my $UserEmail = $UserObj->EmailAddress|(", ");
my $cf_obj = RT::CustomField->new($RT::SystemUser);
$RT::Logger->debug(“Loaded$cf_obj->Name = “. $cf_obj->Name() .”\n”);
I’m ending up with values for each member, but they are messed up. The first
letter of the email address is bogus. I was hoping to get a string of values
separated by that comma so I could just plug the CF into the template.
I checked the log and no errors or warnings are showing up (Ruslan, I KNEW
you’d ask that right off ;-).
Any help would be GREATLY appreciated.