0

Every time I try to deploy any code from sandbox to production if gives the error failed with two test classes failing within the organization, the test classes are tom_test_status_changes and tom_test_status_changes. Even on running these classes itself in the production the test fails.

The error message it gives is

System.DmlException: Update failed. First exception on row 0 with id a0WG000000LAcROMA1; first error: TRANSFER_REQUIRES_READ, The new owner must have read permission: []

for both the test classes. I tried the solutions given on other threads with similar problem to check for owner permissions and also removing the with sharing keyword in the apex class. Still the problem persists.

I would really appreciate if anyone of you geeks can help me solve the problem. It is really urgent as I need to immediately deploy the new updates to the organization.

  • Are you able to log in other users? Try deploying as this Tom fellow. – Adrian Larson Mar 9 '16 at 4:28
  • Can you try compile all classes in Apex Classes in Production as well as in Sandbox and then run the deployment again.If you can paste the test class code here,that might give people more clarity on the problem. – chinmay bhusari Mar 9 '16 at 6:02
0

Today I found out that there was a package Time_off_Manager installed in the organization. The classes failing belonged to this package and this package is no longer in use. So I deleted the package and the problem was solved.

Thanks everyone for your valuable time and effort for helping me solve the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.