I want to know if force.com migration tool follows a specific sequence to deploy components.

the issue I am facing is even though I have removed all references of a variable from my page, still while deploying it gives error for the old reference and asks to remove the reference first.

Is there a way to check details around same


  • have you removed the reference or simply commented it? Jan 1, 2016 at 14:42
  • removed complete reference still gives error when try to deploy new code
    – SEuser
    Jan 3, 2016 at 12:04

1 Answer 1


It's nothing to do with the tool-- it's the API that's doing that to you. For some reason, the API validates that the code metadata is valid before compiling the Visualforce page. Usually, this means you need to comment out the page, then update the class, then update the page again. If you're removing a reference to something in the Visualforce page, you need at least two deployments. You'd have the same problem with the migration tool, mavensmate, etc. The first deployment would be to comment out the page, and the second to deploy the new version entirely.

  • damn that is pretty bad. What I did is in the new code that I am deploying using ANT, i added a new class level variable so that deployed code will find the reference and then I deployed new code base. Once deployment was done removed that single variable that I added in the new code
    – SEuser
    Jan 3, 2016 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .