function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vishal BirarisVishal Biraris 

I am not able to get Values of fields from Custom as well as standard object while sending email triggered from process builder

Hello,

I am not able to get values of standard as well as Custom object fields used in my code (Code is provided below) in email,
I can see the values when i run using "Send test and verify merge fields" option within "Visualforce Email Template"

Currently I am triggering the template from the "Process Builder"

I am only getting Text from below visualforce code but not the values.

My code is :-


<messaging:emailTemplate subject="First payment reminder - Customer id : {!relatedTo.Exact_Online_Account_ID__c}" 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}
     </STYLE>
     <font size="2" face="Lucida Sans Unicode">

<font size="2" face="Lucida Sans Unicode" > Dear  {!relatedTo.Name}, </font><br/>
<br/>

<font size="2" face="Lucida Sans Unicode" >Our financial records show that we have not yet received funds for your subscription for the total amount {!relatedTo.Total_Outstanding_Amount__c}&nbsp;{!relatedTo.CurrencyIsoCode}</font><br/>
<br/>
<font size="2" face="Lucida Sans Unicode" >We kindly ask you to pay each individual invoice using transfer of funds to our bank account within 5 business days of receiving this email.</font><br/>

<br/>
<font size="2" face="Lucida Sans Unicode" >Your outstanding invoices:</font><br/>

<br/>
        <table border="0" > 
            <tr>
                <th align="right"><font size="2" face="Lucida Sans Unicode" >Invoice Number   ;</font><br/></th>
                <th align="right"><font size="2" face="Lucida Sans Unicode" >Payment Due Date   ;</font><br/></th>
                <th align="right"><font size="2" face="Lucida Sans Unicode" >Payment Due Since   ;</font><br/></th>
                <th align="right"><font size="2" face="Lucida Sans Unicode" >Amount Due   ;</font><br/></th>
                <th align="right"><font size="2" face="Lucida Sans Unicode" >Currency   ;</font><br/></th>
                
            </tr>
            
            <apex:repeat var="cx" value="{!relatedTo.Invoices__r}" >
            
                <apex:outputPanel rendered="{! If(cx.Outstanding_Amount_FC__c > 0,true,false) }">
                <apex:outputPanel rendered="{! If(cx.Receivable_Is_Fully_Paid_del__c == 'false',true,false) }">

                   <tr>
                        <td align="right"><font size="2" face="Lucida Sans Unicode" >{!cx.Invoice_Number__c}&nbsp;</font></td>
                        
                        <td align="right"><font size="2" face="Lucida Sans Unicode" >
                            <apex:outputText value="{0,date,dd'/'MMM'/'yyyy}">
                                <apex:param value="{!cx.Transaction_Due_Date_del__c}" /> 
                            </apex:outputText>&nbsp;</font>
                        </td>

                        <td align="right"><font size="2" face="Lucida Sans Unicode" >{!TEXT(cx.Total_Due_Days__c)}&nbsp; Days </font></td>

                        <td align="right"><font size="2" face="Lucida Sans Unicode">&nbsp;
                            <apex:outputText style="float:right" value="{0, number, ###,##0.00}">
                                <apex:param value="{!cx.Outstanding_Amount_FC__c}"/>
                            </apex:outputText>&nbsp;</font>
                        </td>
                        
                        <td align="right"><font size="2" face="Lucida Sans Unicode" >{!cx.Currency__c}&nbsp;</font></td>
                                                                        
                   </tr>
            
                </apex:outputPanel>   
                </apex:outputPanel>                 
                                  
            </apex:repeat>
        </table>  
     </font>
                    
<br/>

<font size="2" face="Lucida Sans Unicode" >Our bank details</font><br/>
<font size="2" face="Lucida Sans Unicode" >Payment reference :- {!relatedTo.Exact_Online_Account_ID__c} </font><br/>
<font size="2" face="Lucida Sans Unicode" >Please do not hesitate to contact us with questions. Thank you in advance for your cooperation. </font><br/>


<br/>
<br/>
<br/>  
                
<font size="2" face="Lucida Sans Unicode" >Best regards,</font><br/>
<font size="2" face="Lucida Sans Unicode" >Collection department</font><br/>
<font size="2" face="Lucida Sans Unicode" >BV Amsterdam, the Netherlands</font><br/>
                
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Vishal BirarisVishal Biraris
Hello, can someone help me on my query !
Vishal BirarisVishal Biraris
Hello, can someone help me on my query !