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
Megan Moody 10Megan Moody 10 

Code coverage >75 in both Sandbox and Prod, but won't deploy

I'm trying to deploy some changes to a trigger, which is just a reduction in the amount of code in that trigger.
The code coverage in the Sandbox is 79%. All triggers have >1%.
User-added image

The code coverage in Production is 88%.
User-added image

When I validate my inbound change set in Production, it says there's only 64% code coverage in the Sandbox. 
User-added image

What could be the problem? The trigger I'm updating has 100% coverage in the Sandbox and I do have the updated test class for it in the inbound change set. I don't know what else to look into. These triggers (not written by me and implemented long ago) have functionality that we don't use and that is causing an inability to use workflow rules and process builder flows. Ideas? 
Niket SFNiket SF
some time "Estimate your organization's code coverage" shows old code coverage. You have to compile all classess again and test the code coverage. Its better to check which test classes like which ones are having low code coverage.