Salesforce Fact #621 | Restrict owner update in case of manual sharing records
In context of the last post, suppose we want to put a validation that if the account records have existing manual sharing records then the owner cannot be changed. We can implement the same using trigger logic. Attached is the screenshot. Note: The code snippet is only for demonstration purpose and coding best practices have not been covered.