+ Start a Discussion

"modify all" permission for test class

Is it advisable to grant "modify all" permission just so that a test class would pass?  Our consultant developer does this but it does not sit well with me.  Please comment or suggest resources for me to read.
Deepali KulshresthaDeepali Kulshrestha
Hi Maureen,

To the best of my knowledge about the topic "Modify All" means users can view, edit and delete all records regardless of sharing rules. Now, as per your question you are changing permission at time of "test class phase" and I am assuming it will be pushed into production after this. In my opinion it will be totally according to requirement of the org and the purpose that it serves. If your code in your org uses sensitive data I'will recommend not to set permission to "Modify All" because in this everyone will have to edit and they may delete some information that may be important.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha