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.

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow