You need to sign in to do that
Don't have an account?

If statement in plain text VF email template
I have a plain text VF email template that I'm working on. It needs to be plain text so that the user can add some information before sending.
I'm attempting to show one address if the account is a person account and another if it's a standard account.
With the code below I'm getting "syntax error", not very descriptive. Any ideas?
I'm attempting to show one address if the account is a person account and another if it's a standard account.
With the code below I'm getting "syntax error", not very descriptive. Any ideas?
<messaging:emailTemplate subject="RMA Request" recipientType="User" relatedToType="Case" > <messaging:plainTextEmailBody > Returning From: Account Number - {!relatedto.Account.Customer_Number__c} Name - {!relatedto.Contact.Name} Address - {!IF(relatedTo.Account.IsPersonAccount, {!relatedto.Account.PersonShippingStreet}, {relatedto.Account.ShippingStreet})} Phone - {!relatedto.Contact.Phone} Email - {!relatedto.Contact.Email} </messaging:plainTextEmailBody> </messaging:emailTemplate>
Let me know if this helps.
Thanks,
Kaustav
All Answers
Let me know if this helps.
Thanks,
Kaustav
For others to reference, here is how I displayed the address. If it's a person account show the person mailing address, if not show the account shipping address. I couldn't find a better way to either insert a new line, or create spaces so things lined up.