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
SabrentSabrent 

Deployment questions


1. After a change set is deployed successfully to Production, and a need be to roll back the changes, Is it possible to do so?

2. My deployment failed, because of a test class that failed. This test class was not part of the original Change set. Now I edited the failed test class - just added 2 lines. Is it a good idea to edit the test case in Production and then deploy my newly created change set or should I include this test class in the change set and deploy it with all other components.

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
NasipuriNasipuri

The answer to the 1st is NO , SFDC don't have and roll back for the change set deployment.

 

It is not best practice to edit and code in the production environment , ideally you should not be allowed by SFDC to edit Apex in the Production ORG , this is allowed for you case , may be it is a production Trial org or may be have done through some special request to the support.

 

So change the code in the Sandbox and deploy to PROD.

 

Thanks and Regards,

Dinesh Nasipuri

Dinesh.Nasipuri@gmail.com

All Answers

NasipuriNasipuri

The answer to the 1st is NO , SFDC don't have and roll back for the change set deployment.

 

It is not best practice to edit and code in the production environment , ideally you should not be allowed by SFDC to edit Apex in the Production ORG , this is allowed for you case , may be it is a production Trial org or may be have done through some special request to the support.

 

So change the code in the Sandbox and deploy to PROD.

 

Thanks and Regards,

Dinesh Nasipuri

Dinesh.Nasipuri@gmail.com

This was selected as the best answer
SabrentSabrent

Thanks for answering my questions.

 

We have two levels of testing before anything gets deployed to production. However I was curious about rolling back changes.

 

Yes I totally understand and agree. no code chnages should be made in production.