+ Start a Discussion
klaineklaine 

Insufficient privileges unless View All administrative permission granted

User gets "Insufficient privileges" message trying to save a custom object for which they have Read, Create, Edit, and View All permissions. Classes and triggers invoked during the save refer to other objects. If user's profile has View All on every standard and custom object, the error still occurs. User can save only if profile has the View All administrative permission.

 

What resource does the administrative permission grant access to that is not included by all the individual objects' View All permissions?

Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

Triggers execute in system mode, so should not be a problem!

Is your apex class running "with sharing" modifier? If yes, then this might lead to the error as the logged in user might not have access to other objects!

Also, pls check if the apex class is enabled for the requisite profile or not. 

Cool_D 

All Answers

Cool_DevloperCool_Devloper

Triggers execute in system mode, so should not be a problem!

Is your apex class running "with sharing" modifier? If yes, then this might lead to the error as the logged in user might not have access to other objects!

Also, pls check if the apex class is enabled for the requisite profile or not. 

Cool_D 

This was selected as the best answer
klaineklaine

Thanks for the idea, Cool_D. The classes did have "with sharing" specified, but it probably wasn't really necessary. As soon as I removed it, everything worked.

 

I still don't understand why I was getting the error with "View All" specified on all individual objects, but at least my app is working now. Thanks again.