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
rajesh k 10rajesh k 10 

I can paste my code straight into production?

Anupam RastogiAnupam Rastogi
Hi Rajesh,

Your code needs to have 75% code coverage before you can move it into Production environment.

So basically -
1. You need to create a Test Class in your staging environment that provides more than 75% code coverage for your code (Trigger/Class)
2. Move the Test Class first into the Production environment using any migration tool like Eclipse IDE or Force.com Migration Tool
3. Finally move your code into Production

If your code is not having adequate code coverage (75% or more), then the deployment will fail.

Thanks
AR

If you found the reply useful that solved your problem then please mark it as best answer.
Vi$hVi$h
Hi Rajesh, 

We can not directly paste code into production. Salesforce does not allow us to make apex & visualforce changes directly in production.

Thanks,
Vishal
sandeep sankhlasandeep sankhla
Hi Rajesh,

I agree with Vish, Salesforce doesnt allow us to create apex and VF in production..so you can not paste the code directly there..and here comes the testcoverage in picture...There is no need to code coverage if we could have paste the code directly in production..

So to port everything there you need to go wuth changesets and we should have minimum 75% code coverage overall..then only it will allow you  to port the changes to poroduction..

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer 
rajesh k 10rajesh k 10
Hi All,
           I agree with all but my production lot of issues(Example: Managed mackages test classes failures).That's why i am asking.Plese give me there is any suggestion with out deployment directly add my vf page and apex class and test class(100% covered) into production..

Thanks...
Vi$hVi$h
Hi Rajesh, 

You cannot deploy to production unless all the test methods pass and overall code coverage is above 75 %.

Thanks,
Vishal Shinde