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
ryanschierholzryanschierholz 

What do you use when plain text, letterhead, custom HTML, and Visualforce email templates won't work?!

What do you use when plain text, letterhead, custom HTML, and Visualforce email templates won't work?!
First, it's infuriating to use Custom HTML email templates and IF statements; they are extremely finicky! For example, I can't get this to show the true OR false elements:
{!IF(ISBLANK(pba__Closing__c.Inspection_Date__c), 'If you have not already scheduled an inspection, let me know when you would like to do one, and I would be happy to schedule for you. If you have an Inspector that you would prefer to use, please let me know. If you need suggestions, I would be happy to provide them and or schedule it for you.', 'The Inspection is scheduled for ' & pba__Closing__c.Inspection_Date__c) }


And I have tried with single and double quotes (and any other possible variation. 

So, I thought using a Visualforce email template might be the solution. The email will be going to a Contact record and its relatedTo a Closing record. When I get all my code in and then add the signature for the Closing Owner, it gives an error: 
Error: Invalid field MobilePhone for SObject Name
<p>{!relatedTo.Owner.Name} <br/>{!relatedTo.Owner.Title} <br/>{!relatedTo.Owner.MobilePhone}


Apparently it understands Name and Title, but not MobilePhone (or other fields I want to use in the signature)! 

So, I am at a loss!