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
ctiuser1ctiuser1 

File saved locally, not to server

After editing my apex class from within the Force.com IDE, i clicked "Save" button. Got an error "File saved locally, not to server". How can i get past this errror? Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
Novo_ArtisNovo_Artis

I have found that when developing directly on a production instance you can get very unhelpful errors.

It can be very frustrating and annoying but I guess you really should be doing all coding on a sandbox or developer instance before deploying to a production instance.

 

One thing that caught me out (didn't give a proper error) a few times was that field validations where not being adhered to by my code.

All Answers

imuino2imuino2

Is that the only error it shows? It can be for many reasons.

Check out on problems panel for Errors marked with a red X, you will have a more detailed error there.

 

Ignacio.

incuGuSincuGuS

Not meant as a joke, but check your internet connection.

 

Also check the other warnings/errors as the other user said.

Another thing that might happen is you are getting time outs, try again, if you cant. Copy your code in notepad (or whatever you use so you dont lose it) and refresh from server. then paste and save. it helps.

jbroquistjbroquist

Right click the file, got to the Force.com submenu, and click Save to Server

 

That should solve your problem...

ctiuser1ctiuser1

Thanks, but there are no errors, just warnings about "file saved locally, not to server." I can create new class and save. It saves to server. But as soon as i edit it  and save, i get this message. Wonder if it is a permission thing..

incuGuSincuGuS

Download the project again, sometimes eclipse just bugs out.

 

Its a weird error now that i know it happens with ALL classes you edit.

Novo_ArtisNovo_Artis

I have found that when developing directly on a production instance you can get very unhelpful errors.

It can be very frustrating and annoying but I guess you really should be doing all coding on a sandbox or developer instance before deploying to a production instance.

 

One thing that caught me out (didn't give a proper error) a few times was that field validations where not being adhered to by my code.

This was selected as the best answer
incuGuSincuGuS

Where you able to solve this ? If so, could you post how?

 

thanks,

Gaston.

ctiuser1ctiuser1

I tried reloading the project and saving manually by clicking the "save to server" button, but the issue persists. I am going to try to get a sandbox and develop there. Will update after i try. Thanks!

BidhanBidhan

I am in a similar situation. I keep getting the 'file saved locally and not on sever' icon -- but, that's all it tells me.

So, the only way out is recreate my IDE environment from source from source control system (or the server).

It's awfully frustrating!!

spenceSetGetspenceSetGet

I just had the same problem.  Thought I would share the answer.  The Force IDE didn't highlight the line the error was on.  As stated above in a earlier reply look under the problems tab.  You may have an error very simpe in my case missing a  closing. }

Marc C.Marc C.

Thought I'd also share my experience at this frustrating error. In my case I had to right-click on my project in Eclipse and choose "Work Online".

 

Not sure how I got offline though it could have been because I imported (with copy) existing projects into a new workspace.

Yousef ShanawanyYousef Shanawany

I found the solution. It is because you are missing an attribute, or some error in your code. 

 

The fix: Go to Window > Reset Perspective > click OK. On the bottom of eclipse, you'll see the panel called "Problems". Fix the errors, then it will upload to the server next time you save.

Deshraj KumawatDeshraj Kumawat

Checkout internet connection or Probles panel in your IDE.

 

Thanks

Deshraj Kumawat

Surendhar Anugu 5Surendhar Anugu 5
1) May be your project is on work-offline, to change this right click project and click on Work-online
2) May be you are trying to change prod environment, try to change object in developer version