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
SFDC DummySFDC Dummy 

Need Help In Deployment

Hi All
 I am new in Migration.I have created a trigger and written test class of that and my code coverage of that trigger is 91%.but when i am moving it from sandbox to production its throwing error like Your Organization code coverage is 66%.for deployment it should be 75%

I mean code coverage od sandbox or Production?

I am unable to find out the exact issue.can any body tell me what the issue and how to resolve this one 
When you deploy your code, salesforce calculates your total organization code coverage, not only for the classes you are deploying. Your individual classes code coverage might be 82/84 % but code coverage for your all classes is 69%. You need to increase your overall code coverage of the org.

You can go to apex classes pages, and click on "Estimate your organization's code coverage" to see your overall coverage of the org. This has to be 75+.
I recommend to check all classes code coverages and try to improve code coverages of classes which are less which will automatically increase code coverage of organization which will help in smooth deployment
SFDC DummySFDC Dummy
Where I will increase the code coverage mean in Sandbox or Production ?
You will write test classes for your apex classes only in Sandbox only and move it to production.
Hi do you deployed successfully (or)  you still struck somewhere??

If this answers you question, please mark it as "Best Answer" so it will help other community members too.