Insufficient Access Rights on Object Id

  • 1
  • Problem
  • Updated 1 year ago
  • In Progress
We have an expense approvals skuid page which goes to the expense page and changes the status from pending to approved on a field on the expense object we created and saves the record.

When individuals are assigned roles on the expense object to have view/modify all, they are able to save with no issue.  However, when they only have read and edit access to the object, the insufficient access rights on object id error occurs.

Attached below is the error.  In separate comments I will attach the access rights as well as the actions occurring on the approve button.

Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb

Posted 1 year ago

  • 1
Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb
Access Images- Field and Object Permissions


Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb
Button properties that is clicked when the error occurs.


Photo of Erik Wahlberg

Erik Wahlberg

  • 2,156 Points 2k badge 2x thumb
I usually get these errors when i'm logged in as another user and trying to edit something I don't have access to. I would first check to see if it's an ownership issue when editing records (if you're not a system administrator). 

What I suspect is happening is that your profile does not have access to your custom object yet, you're going to want to go through Profiles>Edit and search for 'Custom Object Permissions'.

Other than that if your user has access to the custom object, and to the field-level security, then you shouldn't be seeing this access error. 
Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb
I was unable to find the profile view that you are in, however, when reviewing the custom object permissions for the view I was able to access, the profile has both the ability to read and edit on the object.
Photo of Erik Wahlberg

Erik Wahlberg

  • 2,156 Points 2k badge 2x thumb
If you want to confirm it from the profile section just go to Setup and search 'Profiles' it should be under Manage Users (If you're still in SF classic). From there just click the profile of the user who had the issue, click edit, and Ctrl+F 'Name of your custom object'. To see the view in the screenshot above you have to be in 'Edit'

Though i'm not sure this s the reason for your error, its the first place I start when troubleshooting that error and 90% of the time is a profile-related access issue. 
Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb
So this is the weird thing.  The individual when they have read and edit access, they are unable to use the approve button (button changes approved field from pending to approved).  However, when you increase that access to modify all, they are able to approve and the object id error goes away.  Any ideas what the differences in the two levels of access that would make the object ID error go away?
Photo of Erik Wahlberg

Erik Wahlberg

  • 2,156 Points 2k badge 2x thumb
Ok I think I understand what's happening. On the object in question, are they the direct owner of that record? If you haven't set up custom sharing rules for the custom object, users within the same role hierarchy won't be able to edit eachother's records.

When you're enabling edit/view all, it allows users to modify and view records regardless of the role hierarchy or whoever owns the record. 

I would set up a custom sharing rule so go to setup and search 'Sharing Settings'. From there scroll down to your custom object, and create a sharing rule for the users you want to be able to edit each other's records. This fill fix your error message regardless of role hierarchy, record ownership, etc.
Photo of Matrix

Matrix

  • 590 Points 500 badge 2x thumb
Hi david is that problem solved ?? I like to know . i m facing similar issue.
Photo of David Garrity

David Garrity

  • 856 Points 500 badge 2x thumb
I was not able to solve the problem through Salesforce access rights.  What I ended up doing is building custom rendering around the pages, which is not ideal, but it seems to work.