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
Minkesh patelMinkesh patel 

Not able to deploy triggers in empty Production

Hello ,

I have one sandbox in which I have created two triggers and one class with its test class and trigger having 81% coverage and class having 100% coverage but when I tried to deploy the code to production it is giving me error that code coverage is 64%. How is it possible ? There is no data in the production and no classes.

Please let me know if anyone can help me for this ASAP. Please email me @mike@cloudtechy.com or reply to this post.
Any help would be appreciated.

Thanks,
Minkesh
Sfdc CloudSfdc Cloud
Hi Minkesh

Could you check you have only two classes in sandbox ,as per salesforce governer limit overall code coverage should be 75% of org and your org has that coverage.
Just wanted to check you are inserting record in test class itself or using testdata for test classes?. If yes then Might be that testdata won't be available at your Production org and that's y code coverage will decrease to 64%.

Thanks 
:)
Minkesh patelMinkesh patel
Hello SFDC Cloud,

There is data in production. My test class is deployed but class is not deployed.
There are some packages in the production org. Also there is one unmanaged package in the org which is having dashboard and reports only so I don't think anything is affecting. You might be right but not sure how should I do that. Please ping me on skype "Minkesh.asc". I can give you more details.

Thanks,
Minkesh