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
Steve Gilbert 13Steve Gilbert 13 

Change set deployment

I am working on deplying some changes in an apex code. I am not a coder and am learning this as I go but I am running into 1 failed issue which I cannot find out why this "is an issue". I am not sure if there is a way of turning this off, run the deployment, and then turn it back on? Any direction would be great.. thanks.
Best Answer chosen by Steve Gilbert 13
Prateek Singh SengarPrateek Singh Sengar
Hi Steve,
Unfortunately the only way to make changes in a code in production envrionment is via deployment from sandbox. 

All Answers

Prateek Singh SengarPrateek Singh Sengar
Hi Steve,
Can you share the error that you are getting.
Steve Gilbert 13Steve Gilbert 13
Sure "System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3013A0000001Zc3. Contact your administrator for help.: [] 
Stack Trace: Class.TestClassForSendVerificationEmailTrigger.test_SendVerificationEmail: line 12, column 1"

My next plan of attach was to, after hours tonight, deactive the flows that have built on the object and attaempt to deploy again. If it works I know where the porblam lies, if not, I'm back to the drawing board. Best approach?
Prateek Singh SengarPrateek Singh Sengar
Hi Steve,
I would also suggest doing the same. Deactive your flow, perform the migration and then activate it back again. looks like there is a test class which is triggering the flow during unit test execution.
Steve Gilbert 13Steve Gilbert 13
Well, I deactivated all tge flows which di nothing. I checked the sandbox to make sure that the matching code was there with the intention of removing the code from prod and reinstalling it via a change set but when I tried I got a message saygin that you cannot alter the meta data of an active org.... I opened the Dev console found and tried to modify the code via that and got the same error.. This is crazy as there has to be somenow that someone can modify the apex code in an "acyive" org without going through all this??? 
Prateek Singh SengarPrateek Singh Sengar
Hi Steve,
Unfortunately the only way to make changes in a code in production envrionment is via deployment from sandbox. 
This was selected as the best answer
Steve Gilbert 13Steve Gilbert 13
Well, I have done everything that I can find that should be done and no matter what I do I still ge this error:
User-added image
Which is preventing me from altering either of the apex that I need to do before changing my visual force page.. Any ideas, suggestion, advice would be great.. thanks