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
jkucera2jkucera2 

IDE creates new classes in v20.0 instead of 23.0 even after update

I ran the Check for Updates and rebooted eclipse but it still always creates new Apex Classes with API version 20.0.

 

How can I get new classes to default to the latest version?  Its a bit annoying to have to go into the browser to create classes in the latest version.

Best Answer chosen by Admin (Salesforce Developers) 
jkucera2jkucera2

Looks like the 2nd option in the help guide worked:

http://wiki.developerforce.com/page/Updating_the_Force.com_IDE

 

"Update Manually with the Eclipse Install Wizard"

All Answers

Ankit AroraAnkit Arora

Am not sure if you have the latest version of eclipse supported for latest release. So if you want to change the version of your class/page then I have a work around for it.

 

Open your class of which you want to change the version. Now you can two tab at the bottom "Source" and "Metadata". When you click on "Metadata" you will see something like this :

 

<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>22.0</apiVersion>
    <label></label>
    <packageVersions>
        <majorNumber></majorNumber>
        <minorNumber></minorNumber>
        <namespace></namespace>
    </packageVersions>
</ApexPage>

 Just change the apiVersion from 20 to 22/23 and save the class. It will update the version.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

jkucera2jkucera2

Thx - I've done the metadata workaround a few times, but was hoping there was a more permenant solution.

 

Why would I need to upgrade Eclipse if the Force.com plugin was updated to the latest version?  I would expect any version of Eclipse to support the latest API version for Force.com

 

If it matters, I'm using 3.5.2 and teh Force.com IDE is version 20.0.1 even after "check for updates".

jkucera2jkucera2

Looks like the 2nd option in the help guide worked:

http://wiki.developerforce.com/page/Updating_the_Force.com_IDE

 

"Update Manually with the Eclipse Install Wizard"

This was selected as the best answer
Andy BoettcherAndy Boettcher

I was in the same situation - and found out how to actually "fix" it with the IDE.

 

Instead of following the directions - I went to Help -> Software and Workspace Center and updated through THAT.  I had gone through the steps that SF tells you to do, but my IDE didn't update.  Only going through the SWC did it actually work.

 

-Andy