Display Custom Field In HTML Output

Good Day

I am trying to display custom fields in an “Auto Reponse HTML Template”

When I use:
“Domain:

{$Ticket->QueueObj->TicketCustomFields}”

I get RT::CustomFields=HASH(0x98e3460) in my output mail.

Code of Template:

Content-Type: text/html

<p>Greetings,</p>

<p>This message has been automatically generated in response to the
creation of a trouble ticket regarding <b>{$Ticket->Subject()}</b>,
a summary of which appears below.</p>

<p>There is no need to reply to this message right now.  Your ticket has been
assigned an ID of <b>{$Ticket->SubjectTag}</b>.</p>

<p>Please include the string <b>{$Ticket->SubjectTag}</b>
in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.</p>

<p>Thank you,<br/>
{$Ticket->QueueObj->CorrespondAddress()}</p>

<hr/>

<table border="0">
<tr><td align="right"><b>Transaction:</b></td><td>{$Transaction->Description}</td></tr>
<tr><td align="right"><b>Queue:</b></td><td>{$Ticket->QueueObj->Name}</td></tr>
<tr><td align="right"><b>Subject:</b></td><td>{$Transaction->Subject || $Ticket->Subject || "(No subject given)"} </td></tr>
<tr><td align="right"><b>Owner:</b></td><td>{$Ticket->OwnerObj->Name}</td></tr>
<tr><td align="right"><b>Requestors:</b></td><td>{$Ticket->RequestorAddresses}</td></tr>
<tr><td align="right"><b>Status:</b></td><td>{$Ticket->Status}</td></tr>
<tr><td align="right"><b>Domain:</b></td><td>{$Ticket->QueueObj->TicketCustomFields}</td></tr>
 


<tr><td align="right"><b>Ticket URL:</b></td><td><a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a></td></tr>
</table>
<br/>

{$Transaction->Content( Type => "text/html")}TicketCustomFieldTicketCustomField

Please assist.

{$Ticket->QueueObj->TicketCustomFields}”

Returns a RT::CustomFields collection object, that is the hash you are seeing. It seems like you don’t want to load all of the custom fields so a better method may be Ticket->FirstCustomFieldValue('domain') to get one value

Thank you very much Knation :slight_smile:

Works like a charm !!!