[{"message":"ViewAllData or ViewAllRecords required to upsert by standard field","errorCode":"INSUFFICIENT_ACCESS"}]

I'm trying to upsert to an existing record by the ID using a PATCH call. Closest error is the one about external IDs, but mine is unique and I'm not updating it in this call. The user can edit the record through the UI.

Edit: The upsert is done with a post to the sobjects endpoint and with the _HttpMethod query string variable set to PATCH. The user can query the record through the api and an admin account can update the record through the api. I'll try to edit the record with just one field next to see if there's a certain field causing the issue.

1 Answer 1


Hi As you said the user can edit the record, Is this the same record (Same Salesforce Id)? Which Object you are trying to update, and what is the OWD model for that object.

What I understand from the error the Record you are trying to access is not accessible due to sharing settings.

  • It's the same record, it's not a sharing rule issue. It's a custom object. Commented Jan 30, 2020 at 12:53
  • Can you update your question with how you are making the call? Also, please try to fetch the record with the Id through API and see if you can view it or not Commented Jan 30, 2020 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .