Getting "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on object id" when deploying case emailservice classclass into production when running test class.It is passed in all sandboxes but getting error in Production environment?
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Please check the case permission for the user running test classes and if you are creating new user within Test class. Then create with Admin access or some profile having Case access on it.
may I suggest you Please refer the below link for reference.
- https://developer.salesforce.com/forums/?id=906F000000093UmIAI
- https://success.salesforce.com/answers?id=9063A000000ZnJaQAK
Hope it will be helpful.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
Please check the case permission for the user running test classes and if you are creating new user within Test class. Then create with Admin access or some profile having Case access on it.
Thanks,
Gaurav