1

I'm creating an Visual force Email Template with Dynamic Header Image.

For Example: In Account Object I have two custom Fields. Use_Parent_Logo (boolean Value) and Logo_URL__c is the URL field.

The above account is mapped with parent Account. In the Parent account has also have same two Fields, Value may have different in Logo_URL__c.

My Condition is, If the Account Use_Logo = true then Use the account Logo_URL__c

Else

Use the Parent account Logo_URL__c.

 <messaging:htmlEmailBody >
<table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width:100%;" width="100%">
<tbody>
    <tr>
        <td valign="top" width="600">
            <div style="display: none; font-size: 1px; line-height: 1px; max-height: 0px; overflow: hidden;"></div>
            <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#F1F3F4" style="background-color:#f8a8af;">
                <tbody>
                    <tr>
                        <td align="center" style="border:none; padding-top:30px; padding-bottom:30px;" valign="bottom"><a border="0" href="" style="border:none; outline:none;" target="_blank">
                                <img alt="Google Store" border="0" src="{!IF(relatedTo.User__r.Use_Parent_Logo=true,"relatedTo.User__r.Logo_URL__c","https://img1a.flixcart.com/www/linchpin/fk-cp-zion/img/fk-plus_043837.png")}" 
                                style="-ms-interpolation-mode:bicubic;border:none;max-width:100%;outline:none;width: 250px;vertical-align: bottom;" width="32"/></a></td>
                    </tr>
                    <tr>

Image is not getting in that email. Anyone Please help on this.

1 Answer 1

1

Replace with "relatedTo.User__r.Logo_URL__c"

to

(relatedTo.User__r.Logo_URL__c). Remove the quote and add parenthesis.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .