Question 1
AdvancedAdvanced Developer Fundamentals · Base System Objects
A multinational financial services firm uses a custom object Transaction__c to log highly sensitive financial data. Due to regulatory requirements, visibility to these records must be strictly controlled. The sharing model is set to Private. A requirement exists where a Transaction__c record must be shared with a specific auditor user defined in a lookup field Auditor__c on the record itself, but only when the Status__c is 'Under Review'. The auditor should have Read-Only access. The sharing logic must be automated and robust against ownership changes. Which approach is the most appropriate implementation?
Answer and explanation
Correct answer: B
Apex Managed Sharing is required here because Criteria-Based Sharing Rules cannot target a dynamic user defined in a lookup field on the record itself (they target Groups, Roles, etc.). Apex Managed Sharing allows the creation of a __Share record with a custom RowCause (Apex Sharing Reason), which ensures the share persists even if record ownership changes, unlike manual sharing.
