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

<messaging:htmlEmailBody >
    <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}
    <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>Owner Id</th>
            <apex:repeat var="cx" value="{!relatedTo.Cases}">

         Best Regards,

         <p />

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?


You need the $User global variable:

Beest Regards,

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.