Have you ever tried to update a high number of permissions in multiple Salesforce profiles? How long did it take you? Did you feel frustrated while working on this task? It is very time consuming and requires many clicks if you are doing it manually. Or maybe you attempted to create a number of fields and had to spend your whole day doing this. Deleting existing fields is even worse, especially when you click Delete just to see a message that a field if referenced somewhere else and cannot be deleted. And what’s about reports? How do you change or fix reports located in multiple folders and owned by different users? Identifying such reports takes a lot of time and it you leave the fixes to your users, you will end up with an increased number of support requests.

When you have to work on such tasks you have two options: keep working on them using manual tools and keep spending time that you could dedicate to investigating new business critical solutions and learning about latest Salesforce functionalities or start looking for ways of automation.

I really dislike time consuming repetitive tasks and that is why I started looking for other ways and tools. When I saw how quickly developers can manipulate metadata using Eclipse and Force.com IDE, I decided to check if there was anything in it for Admins. Now I use Force.com IDE every day and the best thing is that you don’t need to be able to code to benefit from its functionalities.

So what is Eclipse, Force.com IDE and Metadata? And how is all of this related to Awesome Admins?

Eclipse is a free application that is used by Java developers to create, amend, test and deploy code. Force.com IDE is an Eclipse plugin (also free) that allows Salesforce developers to use it for Apex coding. What many Admins don’t know is that it is not its only purpose. You can create a copy of your Salesforce metadata (data that describes your Salesforce elements, such as fields, objects, profiles, validation rules, etc.) on your local computer, manipulate this metadata using point & click functionalities and bring changes back into a Salesforce production or a sandbox or both.

Why use Force.com IDE if you can do the changes directly in the Salesforce Setup? If you are working on a couple of small changes, it probably doesn’t make sense. But if you are working on high number of changes using Force.com IDE will help you save a lot of time and avoid making many errors.

Preparation

Before you can start working with Force.com IDE, you need to install it.

Force.com IDE is an Eclipse plugin which means you need to install Java SE Development Kit (JDK), Eclipse and only then Force.com IDE. You can find detailed instructions here.

Within Force.com IDE you work with projects. A project is a frame or a parent folder that contains subfolders (component types) with metadata files. For example every org has a subfolder called ‘objects’ which includes .xml files that describe standard and custom objects (one file per object). Force.com IDE downloads metadata from your org (production or sandbox) and stores it in an allocated PC folder. Depending on the task you are working on you may have a project with all metadata or just selected metadata.

In the example below I have created a project called ‘My Sandbox’ that includes my sandbox metadata.

Example1

Metadata for each component type, for example, objects, profiles, reports, workflows, is stored in a separate subfolder of a project. You can add it before you complete creation of a project or after. Unless you know what exactly to add my advice is to do it after a project is created as you may add too much which significantly increases both time required for downloading metadata and a possibility of making errors during your work.

For example if you are updating reports, you may create a project that only contains reports metadata.

example2

Create a Project

In Force.com IDE click File -> New -> Force.com Project.

  • Type a project name.
  • Type your username and password.
  • If your organization uses security tokens, add it.
  • Make sure a correct Environment is selected. You will either be working with a Production/Developer or a Sandbox environment.
  • Click Next.

example3

  • On the next screen click None, then click Finish.

example4

By doing this you have created an empty project.

example5

Now you need to add metadata into your project.

  • Click on the name of your project -> right click -> choose Force.com -> Add/Remove Metadata Components.
  • On Force.com Project Contents screen click Add/Remove button.

example6

  • Click Select All or alternatively choose component types that you want to include into your project (objects, workflows, reports, dashboards). Then click OK.

example7

  • Click Apply.
  • When you see Refresh Project from Server message, click Yes.
  • Once the operation is completed click OK.

Your project is ready.

example8

 

Important! Great power is always accompanied by great risks. Force.com IDE allows you to work both online and offline. When you work online, changes you make are reflected in your Salesforce org. This can be dangerous. Therefore after a new project is created always check it is in an offline mode.

To do this click on the project name -> right click -> select Force.com -> make sure the option under Remove Force.com Nature says Work Online. This means you are currently working offline.

In the following posts I will be showing examples of how Salesforce Admins can benefit from using Eclipse and Force.com IDE.

 

Share Button

Comments

comments