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
skpskp 

Dynamic Subject line evaluation in SingleEmailMessage, inside a S-Control

Hi,
 
MassEmailMessage does not evaluate CustomObject values, in the defined Email Template - it seems this at present is a limitation.
 
As a woraround I am planning to use SingleEmailMessage where I would get the "Subject" from the relevant EmailTemplate object.
 
Say my "Subject" in the database is "Email from {!CustomObject__c.Info__c}".
 
Question: How do I assign this value to "singleRequest.subject" (where singleRequest = new sforce.SingleEmailMessage())
 
If I assign the value straight from the database, my subject line would still contain  "Email from {!CustomObject__c.Info__c}" and NOT  "Email from value from CustomObjectField" ===> where I am assuming that {!CustomObject__c.Info__c} gets evaluated to "value from CustomObjectField""
 
I think it is something very simple, but ...
 
Hope I am clear.
 
Thanks in advance!