In an Account Object a field called ‘Sales Person‘ and it has lookup relation with the user object. If the user is selected as the salesperson for a record, that user able to see those records, but OWD is private, record owner and admin will not share any records.
1 Answer
This appears to me to be a textbook use case for Apex-Managed Manual Sharing.
You'd use a trigger on the Account object to programmatically insert and maintain AccountShare
records. The trigger would need to react to changes in the lookup field, as well as to changes of ownership (since Manual sharing records don't survive ownership changes). It'd remove any shares to the previously-assigned Sales Person and create and insert new shares for the new value.
True Apex-Managed Sharing is not available on standard objects.