You need to sign in to do that
Don't have an account?

Unable to deploy the code into production
Everytime I try to deploy any code from sandbox to production if gives the error failed with two test classes failing within the organisation, 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 organisation.
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 organisation.
Thanks everyone for your valuable time and effort for helping me solve the problem.
All Answers
I can't tell you what's wrong with your test class without taking a look at your code. You can refer this link and it would help you.
https://developer.salesforce.com/forums/?id=906F0000000BXwAIAW
I can't tell you what's wrong with your test class without taking a look at your code. You can refer this link and it would help you.
https://developer.salesforce.com/forums/?id=906F0000000BXwAIAW
If you can paste the Test Class code then will try to guide you.
Make sure that which ever user you are trying for with, it is assigned Role then it will be accessible to all records. Then you will not get any sharing issues.
There may be owner change is happening whenever you change the Status.
Regards,
Mahesh
Thanks everyone for your valuable time and effort for helping me solve the problem.