+ Start a Discussion
Paul Fitzpatrick 22Paul Fitzpatrick 22 

Releasing Apex and Visualforce code using Change Sets to Production

I have successfully "pushed" Apex Class and Visualforce(VF) code changes via the Change Set 
mechanism between different Sandboxes, tested and everything is working fine.  

The closest I have managed to get to deploying Apex and VF changes to Production was uploading an Outbound Change Set to Production, and clicking 'VALIDATE' to the inbound Change Set in Production. The 'VALIDATE' operation worked fine reported no errors. 

(I managed to overcome the issue(without help) with Apex Test Class coverage, as it is a requirement that tests run >74% if attempting to deploy Apex code to Production ). I have tested rigourously numerous Outbound Change Sets and Inbound Change sets involving Apex and VF between Sandboxes with no issues.

The only step I need to take now is to DEPLOY the Apex and VF code to Production. Is it safe to assume that if I have tested the Apex and VF rigorously in the source Sandbox Org, uploaded the Outbound CS(Containing Apex and VF) to Production, VALIDATE the Inbound CS (with no errors/issues to report) in Production, then the actual DEPLOY operation to Production should work without a problem as the deployment is an all-or-nothing(atomic) operation?

Can anyone please reassure me, need to perform the Release soon, this is quite urgent!

Ashish GargAshish Garg

Yes this is an all-or-nothing(atomic) operation with Change set. Please assure, test coverage should be >=75% not 74%.
If the change set is validated successfuly in production, then it will surely not fail with existing state of production. You can be assured with the changes set.

Please make sure before deploying change set in production and after validation performed with the same, no other deployment was done in production. If so, then, reensure the change set by validating again as new deployment may affect your change set. You can find any deployment in Inbound Change Sets for production.

If all things are as expected, then you are ready to go and then change set will not fail while deployment.

Ashish Garg
Email: ashish6mains@gmail.com
Mob: +91-8952827377
Paul Fitzpatrick 22Paul Fitzpatrick 22
Many thanks for your help, Ashish! Sent from my Samsung device
Paul Fitzpatrick 22Paul Fitzpatrick 22
Hi Ashish, I understand that a true 'rollback' mechanism does not neccesarily exist in Salesforce. However, what are my options for 'reverting' metadata changes (specifically Apex and Visualforce) that have already been 'deployed' to Production? It would be most useful to highlight the various options; and how to do the 'revert' whether using Change Sets, Force.com IDE, Force.com Migration Tool or Workbench, if you are in a position to do so. Many thanks, Paul. Sent from my Samsung device