0
<messaging:emailTemplate subject="Case Report Type" recipientType="Contact" relatedToType="Account"

replyTo="">
<messaging:htmlEmailBody >
 <html>
 <body>
    <style type="text/css">
      TH {font-size: 11px; font-face: arial;background: #CCCCCC;
           border-width: 1;  text-align: center }
      TD  {font-size: 11px; font-face: verdana }
      TABLE {border: solid #CCCCCC; border-width: 1}
      TR {border: solid #CCCCCC; border-width: 1}
    </style>
    <font face="arial" size="2">
        <p>Dear {!recipient.name},</p>
        <p>Below is a list of Assets related to the Case: {!relatedTo.Name} </p>
        <table border="0" >
            <tr >

                <th>Case Number</th>
                <th>Origin</th>
                <th>Owner Id</th>
            </tr>
            <apex:repeat var="cx" value="{!relatedTo.Cases}">
            <tr>

                <td>{!cx.CaseNumber}</td>
                <td>{!cx.Origin}</td>
                <td>{!cx.OwnerId}</td>
            </tr>
            </apex:repeat>
         </table>
         Best Regards,

        {!relatedTo.Name}
         <p />
    </font>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

In the Signature section of this template I want to get merge fields of logged in User instead of {!relatedTo.Name} . How do i achieve this?

1

You need the $User global variable:

Beest Regards,
{!$User.Name}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.