Remedy: This error shows up when the Openprise user performing the action doesn't have the necessary permissions. This is an error returned from Salesforce.
Check the user profile to see if the user has access to insert/update that record. If the user has access, check whether the user has access to update fields like record types, lookup field, master-detail field, etc.
Troubleshooting steps:
- Determine if the user has access to record ids of the lookup fields and/or master-detail fields in the record.
-
Check the user Profile(CRUD Permissions).
- Profiles need to have access to the record types.
- Record's OwnerId automatically gets a shared record when the record is inserted. If the apex code tries to create the same(Share record for the owner) explicitly, this error occurs.
- Check whether the apex code is trying to create shared records to the record in which the current user doesn't have access to it.