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
PapsakPPapsakP 

How to deploy apex class changes from the production Developer Console?

Hi all

 

I know how to deploy changes to my apex class from the sandbox. I create an outbound change-set while logged into sandbox, and upload it. I then log into the production org and go to the inbound changesets to deploy it. This works fine.

 

What i would like to know is, if i wanted to make changes in the developer console for the production org directly and didnt want to have to go the changeset route, is it possible for me to do this? (saving the class in the prodcution org developer console does not deploy it automatically...is there something i am missing here?

 

Thanks a mill

Best Answer chosen by Admin (Salesforce Developers) 
hitesh90hitesh90

Hi,

 

You can't be able to save the new changes in apex class from developer console of production. This is not possible.

you must have to first make changes in sandbox and then you can deploy it to production using changeset as you have discussed.

you can do it only in sandbox.

 

Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/

All Answers

hitesh90hitesh90

Hi,

 

You can't be able to save the new changes in apex class from developer console of production. This is not possible.

you must have to first make changes in sandbox and then you can deploy it to production using changeset as you have discussed.

you can do it only in sandbox.

 

Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/

This was selected as the best answer
PapsakPPapsakP
thank you! so what is the class code file in production org developer console used for? why is this a separate version code file to what is in sandbox?
hitesh90hitesh90

That is not the separate version. it's same as in production controller.

It is for check the code coverage also.

 

PapsakPPapsakP

Mine are defeinitely seprarte versions. if i save something in production org dev console, it does not refelct in the sandbox dev console version of the code file. I can keep 2 separate copies each with different changes. I have checked and tested this 3 times...any idea as to why?

PapsakPPapsakP

One more thing if i may....

 

When deploying from sandbox to production, does the test class run automatically? I noticed that if the deployments FAILS, i look at the details and it seems that there was an error with regard to the 'Asserts' in the test class.

hitesh90hitesh90

Yes, Test class will execure automatically whenever you deploy the code.

and yes, Production's developer console and sandbox's developer console both are different things.

souvik9086souvik9086

Yes the test class will run during deployment from sandbox to production and if the test passes then onle it will be deployed.

 

If you want to change the classes directly in the production account you can do it through force.com IDE.

 

If the post helps you please throw KUDOS.

PapsakPPapsakP
Thank you!!