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
dev_jhdev_jh 

Creating Email Templates through Eclipse

Hi,

 

I wanted to copy some Worflow from one SF environment to another using Eclipse. The problem is that I don´t see an option to create an "Email" object manually through the IDE. Is this possible? Thanks,

 

J

Best Answer chosen by Admin (Salesforce Developers) 
JonPJonP

Rather than copy files between projects/organizations in the IDE, use the Deploy to Server wizard.

 

1. Create a project against your source organization with the files you want to copy to another organization

2. Right-click on the "src" folder and select Force.com > Deploy to Server

3. Follow the wizard steps to upload these files to the target organization

 

Voila.

All Answers

wesnoltewesnolte

Hey

 

I don't know if you can create templates in the IDE but you certainly can pull them from your salesforce Org. You'll need to create a folder and put all your email templates into that folder(all of this must be done in the browser).

 

Then you will need to right click on your project in Eclipse > Project Contents > Add/Remove > hit refresh. You will see your folder and email templates available for "download".

 

Cheers,

Wes 

dev_jhdev_jh

Thanks! I know I can access them, but what I want to do is copy them accross orgs. The copy I know how to do, the problem is the "paste" :)

 

J

JonPJonP

Rather than copy files between projects/organizations in the IDE, use the Deploy to Server wizard.

 

1. Create a project against your source organization with the files you want to copy to another organization

2. Right-click on the "src" folder and select Force.com > Deploy to Server

3. Follow the wizard steps to upload these files to the target organization

 

Voila.

This was selected as the best answer
dev_jhdev_jh

Thanks for the suggestion Jon, I will definetely use it in the future. I like the copy & paste XML approach honestly because sometimes I just copy some fields / validation rules accross and with your approach I don´t have (to my knowledge) that level of granularity (I have to copy the whole object). But point taken for other stuff. Let me know if there is a better way to copy certain elements from an object accross, very interested!

 

Thanks,

 

J

JonPJonP

You're right, Deploy to Server lets you work at the file level but not smaller.

 

One trick:  Depending on what you're trying to copy, you can use Deploy to Server in conjunction with the New Force.com Project wizard to copy a little more precisely.  For example, if you want to copy 3 custom fields from an object with 10 custom fields, then when you create a new Force.com project use the Choose Metadata Components dialog to select just those 3 custom fields.  You will get a .object file in your project, but it will only contain the fields you selected.  From the Deploy to Server wizard, you can then deploy that .object file to your target organization.

 

There are a few metadata types where the file contains multiple named items.  Besides .object, the .workflow file comes to mind.  You can explore the Choose Metadata Components tree view to see what files/types have subcomponents.

dev_jhdev_jh
Thanks Jon!
wesnoltewesnolte
Some elegant ideas. I'll be using them from now on. Cheers mate.