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
John L.John L. 

How can I add a field/attribute to the EmailTemplate object, OR create a new object (with adds)

I'm doing development, and need to extend the existing EmailTemplate object.

 

How do I add a field/attribute to this object, OR how do I create a new object that includes all the fields/attributes of the EmailTemplate + my additions?

 

Is there anyway to accomplish this other than a brute-force object creation, that copies the original attributes item by item and requires manual updates if the original EmailTemplate object definition is ever changed in the future?

 

Said another way, I'd like my changes to be added to any current (or future) definition of the EmailTemplate object.

 

Thanks in advance for any help you may be able to provide.

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox
The EmailTemplate object isn't customizable. Most likely you'll need a custom object. I would probably advise using a text field that holds the ID value of the EmailTemplate it is extending (unfortunately, it cannot be a lookup field).

All Answers

sfdcfoxsfdcfox
The EmailTemplate object isn't customizable. Most likely you'll need a custom object. I would probably advise using a text field that holds the ID value of the EmailTemplate it is extending (unfortunately, it cannot be a lookup field).
This was selected as the best answer
John L.John L.

Thats what I suspected. Now my problem has morphed into  the following page markup:

 

   <apex:variable value="{!backTemplateLookup('{!tmpl.DeveloperName__c}')}" var="eT"/>

 

results in the following error when attempting to Quick Save:

 

   Error: Unknown function backTemplateLookup. Check spelling

 

where backTemplateLookup(String s) is a public method in the page controller.

 

Thanks in advance for any help you may be able to provide.