Find your content:

Search form

You are here

How to find the reason for Insufficient Privileges?

 
Share

I am going through the "Development with the Force.com Platform" book and have run into an issue when implementing the sample application from the book.

The example is to demonstrate manual sharing:

  • Two employees from the example organisation have separate roles: West and Central
  • The employee with the West role has owner ship of a Resource record and creates a manual share with Read Only permissions so that anyone with the Central role can read the record.
  • The employee with the Central role then has to create an Assignment record which involves using the shared Resource record and a Project record which he is the owner of.

Unfortunately when I try to do this (logged in as the Central user). I get the following message:

Insufficient Privileges. You do not have the level of access necessary to perform the operation you requested

What I have checked:

  1. That there is a manual sharing rule for that Resource which shares with Central role.
  2. That the when logged in as the Central user, I can read the record. Which I can.
  3. I have tried setting the Central users role to West (the same as the Resource owners') and the Assignment can then be created OK.
  4. I have checked that the user is indeed set as having the Central role.

I really don't see what else it could be. Does anyone have any suggestions?

Rather than just suggestions, though, is there a way that I can find out exactly which security settings are denying this operation? Some debugging perhaps?

Many thanks


Attribution to: Joe

Possible Suggestion/Solution #1

I am not familiar with anyway to debug that. And I know you asked not for mere suggestions, but that's about all we can do.

You will just have to go over the settings again -

security (for profiles as well as roles)
sharing - yea, check again
views (if they use different ones) - to note, I am not familiar with that "book" that you follow, so don't know.    

Have a look at the following idea on ideasexchange - I believe that if this will get implemented, most of our problems (well not most - maybe some) will be sorted

Insufficient Privileges - Tell me why


Attribution to: Saariko

Possible Suggestion/Solution #2

Maybe try checking the Central user's access to whatever record type your unable to create. Check at the profile and object level.

Also when you try to create a share when the resource (object privacy) is already 'public read only' -- the DML throws an arbitrary exception - so also check the record is set to private


Attribution to: jordan.baucke

Possible Suggestion/Solution #3

Kind of depends on what Profile the employee you are using has....

According to the diagram on page 51, Assignment, being an intersection object is the child of both Project and Resource in a Master-Detail relationship and thus inherits access from the Master.

Looking at page 78 in the book, Sales Rep and Consultant only have "Read" access to the Master records and do not have create access for the Assignments. They both already have read access to Resource.

In fact everyone has read access for Resource, so your sharing rule is not necessary and might cause errors as mentioned above.

Only the Staffing Coordinator and Vice President profiles have the appropriate access to create an Assignment record, so regardless of sharing, only these two Profiles can create Assignment records.


Attribution to: David
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1281

My Block Status

My Block Content