Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I create class in eclipse I get version no:27.But When I create a new class in Salesforce UI it is 29.I have updated IDE but it still says 27.How to update it ?

share|improve this question
up vote 3 down vote accepted

It's been a while since I've used the Eclipse IDE (I use MavensMate + Sublime Text now), but every class should have a "-meta.xml" file associated with it. Inside this file is where the version is assigned. In the past the default version was only updated when new versions of the IDE were released, forcing you to manually adjust classes until that point.

You can change that meta.xml file on a Sandbox and then deploy it to Production in order to change the version number.

Another option is to login into your Sandbox and lookup the Apex Class in question. Then click over to the "Version Settings" tab and change it to whatever you wish. Then in the Eclipse IDE, Refresh the Apex Class from the Server.

enter image description here

share|improve this answer

I use the Force IDE and have the latest version installed. It creates API version 29 classes by default.

It is possible your update did not complete correctly. So the first step is to check the version you are running by selecting Eclipse -> About Eclipse and then clicking on the IDE icon (some sort of X using a red arrow). That is on a Mac - on Windows it is something like Help -> About.

So if the version is wrong repeat the upgrade watching out for errors and check again afterwards. If the version is right then I don't know what the problem is.

Note that the IDE releases lag the platform releases by a few weeks and moving to a new version of the IDE requires projects to be upgraded which is disruptive and litters your version control system with fairly purposeless changes. Personally I do not upgrade every time there is a new version of the IDE because of that disruption. As others have posted, you can manually move a class to the latest API version if you need some new feature. I guess I am saying that 27 isn't so far behind that you necessarily need to change.

share|improve this answer

Some useful questions seem to be:

Override Eclipse Metadata API Version

I'll be honest - I've got Eclipse setup but not really used it so I personally can't comment of the validity of the answers on the links, but they seem inline with Jonnybro's answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.