I have been going through the forums and the documentation and I do not find a way to query the Users who have access to a particular record.
For example, when I upload a document, a mail has to be sent to those Users who have access to that particular document. For this, I need the UserId.
The UserRecordAccess
object doesn't allow us to query the UserIds. How can we do this?