+ Start a Discussion
CraigHCraigH 

Upgrading Eclipse / v18 API upgrade for existing code

I recently upgraded Eclipse to support Spring 10 / API v18.

 

Now, when I create a new class from Eclipse, it will default the API to v18.

 

What do people generally do about all of the existing v16 classes, triggers, pages they have created?  Would you suggest doing a 1 time upgrade by going to each component and upgrading to the new API.  Or do them one at a time as they get changed over time with on-going development/fixes?

 

In order to upgrade to, is it best to use the salesforce web UI or do it via the metadata XML in eclipse?

Best Answer chosen by Admin (Salesforce Developers) 
ahab1372ahab1372

I usually update through the IDE because I think (not 100% sure) that in the UI it replaces any tabs with whitespaces which I don't like. Not a big deal though.

I am usually not in a rush with updating because if it is working code there is no obvious benefit in updating it to a newer API. It will typically work just the same way as before.

Sometimes a newer API might require you to change code if you are using features that are deprecated in the newer API version. That might be rare but it does happen so make sure you test in a sandbox before doing that. So all in all, there is some work required to do that but no benefit for code that remains otherwise unchanged. That's why I only update if I deploy changes anyways.

All Answers

ahab1372ahab1372

I usually update through the IDE because I think (not 100% sure) that in the UI it replaces any tabs with whitespaces which I don't like. Not a big deal though.

I am usually not in a rush with updating because if it is working code there is no obvious benefit in updating it to a newer API. It will typically work just the same way as before.

Sometimes a newer API might require you to change code if you are using features that are deprecated in the newer API version. That might be rare but it does happen so make sure you test in a sandbox before doing that. So all in all, there is some work required to do that but no benefit for code that remains otherwise unchanged. That's why I only update if I deploy changes anyways.

This was selected as the best answer
incuGuSincuGuS

I would suggest only updating if necesary, or if you are code reviewing some of your old code.

 

I think its ok , as you mentioned you do, to only update when you deploy as part of a bigger change/work .

 

 

Cheers,

Gaston.