On Thursday 09 November 2006 22:10, Bill Weaver wrote:
> When I try to reference that within a
> Template like this: 
> 
> To: {$Ticket->FirstCustomFieldValue('Email');} 
> 
> It returns undef. 

You want to do something like this instead:

    To: {
        my $email;
        my $val = $Ticket->CustomFieldValues('Email')->First();

        if ($val) {
            $email = $val->Content();
        }

        # no value for 'Email' CF
        else {
            $email = '[EMAIL PROTECTED]';
        }

        $email;
    }

See RT/Ticket_Overlay.pm and RT/Record.pm .

-- 
Garry T. Williams --- 678-370-2438

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to