Force.com IDE didn't reflect my changes?

2020-07-26 20:29发布

问题:

I just refactored (renamed) some Apex classes on the Saleforce web, and the change seems to have taken just fine on the web.

But the force.com IDE did not download these new classes.

Refresh from Server, Save to server and Synchronize all appeared to do nothing.

But if I go under "Project Propertiess, and then change the 'Project Contents' to include everything, then it seems to be syncing....

Seems odd I have to do that... is it normal?

回答1:

Yes it's normal. When you first create your project you select the metadata that you'd like to subscribe to. This has a number of benefits but the chief amongst these are quicker saves and (if you have a massive amount of code) better project management.

The reason you didn't see the files at first is because they were created server side and your project wasn't subscribed to them.

As a best practice you should try to work just within the IDE. It makes development much safer considering it's more difficult to overwrite code - especially important if you're working in teams.



回答2:

I had a similar issue. Here is what I did.

  • Right click on the Sandbox in the Navigator.
  • Select properties
  • Expand Force.com and click on Project Contents
  • Click on the Refresh button which successfully update the metadata for me when the force.com->Refresh from Server option stopped working for some reason.


回答3:

For people looking here who didn't see changes to their METADATA for OBJECTS... make sure that you are actually changing the API name of the object through the Web UI, and not just the Label. If you don't change the API name, it can appear as though changes are not reflected in the Force.com IDE.