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
Mark LeadbetterMark Leadbetter 

Viusal Force Email Template Issue

I have created a custom object caled RFI and it is linked to Accounts. I am sending out an email template via a visual force email template. When I try and refer to the Customer Name as below I just get its idetifier and when I try and refer to the billing address i get the message error: Unknown property 'String.billingaddress'


 <messaging:emailTemplate subject="NEW RFI" recipientType="User" relatedToType="RFI__c">
<messaging:plainTextEmailBody >
New RFI has Been Created by { !User }
Branch: {!relatedto.Branch__c}
Area For Delivery: {!relatedto.Area_for_Delivery__c}
Contract of Sale Number:{!relatedto.Contract_Of_Sale_Number__c}
Date proforma invoice required: {!relatedto.Date_Proforma_Invoice_Required__c}
Date Actual Invoice Required:{!relatedto.Date_Actual_Invoice_Required__c}
Delivery Date: {!relatedto.Delivery_Date__c}
Order Number: {!relatedto.Order_Number__c}
Customer Name: {!relatedto.Customer__c}
Address: {!relatedto.Customer__c.BillingAddress}

Thanks in advance,
cheers

AshlekhAshlekh
Hi,

New RFI has Been Created by { !User }  this will give you id

New RFI has Been Created by { !$User.firstname } Try this one

Address: {!relatedto.Customer__c.BillingAddress} here relation ship is not correct

Address: {!relatedto.Customer__r.BillingAddress} when to try to access parent record then user " __r " instead of "__c".

Hope this wll help you.