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
JasonGablerJasonGabler 

BUG: Email templates missing in IDE v23 (though you can see it in earlier version, such as v20)

Open your IDE for a project, use the Add/Remove Components dialog and for v23 the "Email" folder does not appear.  

 

... if only there was a place to post bugs.

 

jason

JPClark3JPClark3

I just noticed this also. This is a problem because you cannot push up the complex html for the emails without this.

 

JPClark3JPClark3

I've added this to Ideas:

Add Email Templates back in

seahorcesolnsseahorcesolns

Am I the only one who can no longer see the detailed metadata components under custom and standard objects (custom fields, record types), too?  Am I expected to push the entire object now?  Please don't make me use Change Sets!

ChrisNoeChrisNoe

Anyone hear anything about a fix for this?  I received an IDE update today but it doesn't look like it fixed the email issue.

ministe_2003ministe_2003

I'm really surprised there aren't more threads or ideas about this, in fact there's very few relevent google results too.  It definitely affects me though.  Come to check our email templates for hard coded URLs because of an instance change and lo and behold, I can't export email templates!  I'm going to have to go through every email tempate manually!!!

BBeairdBBeaird

I don't understand why this was removed.  Please add it back.

MrTheTylerMrTheTyler

I am running into this problem as well.  Found this tidbit about editing the package.xml file but no dice for me.  http://paulbattisson.com/?p=80

 

Any ideas anyone?

MrTheTylerMrTheTyler

just got it working.  for the unfiled templates one must do as follows:

 

<types>
<members>unfiled$public/ContactFollowUpSAMPLE</members>
<name>EmailTemplate</name>
</types>

 

 

also, i fixed the exec anon code snippet from the blog:

 

    	String output = '\n\n';
		EmailTemplate[] templates =
			[Select e.FolderId, e.DeveloperName
			From EmailTemplate e];
		
		Map<ID,folder> folders = new Map<ID, Folder>(
			[Select f.Id, f.DeveloperName
			From Folder f 
			where f.DeveloperName != null]);
			
		Set<Id> folderIds = new Set<ID>();
		folderIds.addAll(folders.keySet());
		
		for (EmailTemplate template: templates) {
		if (folders.keySet().contains(template.FolderId)) {
		if (folderIds.contains(template.FolderId)) {
		output += '\t' + folders.get(template.FolderId).DeveloperName
		+ '\n';
		folderIds.remove(template.FolderId);
		}
		output += '\t' + folders.get(template.FolderId).DeveloperName
		+ '/' + template.DeveloperName + '\n';
		}
		}
		output += '\n';
		System.debug(output);

 

 

Tyler

 

Need Help?  www.salesforcesuperheroes.com

 

MrTheTylerMrTheTyler

even better code found at https://gist.github.com/1445287

 

// Derived from http://paulbattisson.com/?p=80

String output = '\n<types>\n';
List<EmailTemplate> templates = [Select e.FolderId, e.DeveloperName From EmailTemplate e];
Map<Id, Folder> folders = new Map<Id, Folder>([Select f.Id, f.DeveloperName From Folder f where f.DeveloperName != null]);
Set<Id> folderIds = new Set<Id>();
folderIds.addAll(folders.keySet());
 
for (EmailTemplate template: templates) {
  if (folders.keySet().contains(template.FolderId)) {
    if (folderIds.contains(template.FolderId)) {
      output += '\t<members>' + folders.get(template.FolderId).DeveloperName + '</members>\n';
      folderIds.remove(template.FolderId);
    }
    output += '\t<members>' + folders.get(template.FolderId).DeveloperName + '/' + template.DeveloperName + '</members>\n';
  }
}
output += '</types>\n';
System.debug(output);

 

Tyler

www.salesforcesuperheroes.com