Certified Sharing and Visibility Architect Exam QuestionsBrowse all questions from this exam

Certified Sharing and Visibility Architect Exam - Question 7


What should a Salesforce architect recommend to make sure that users that gained access to a custom object record through Apex managed sharing do not lose access to it when its owner is changed?

Show Answer
Correct Answer: B

To make sure that users who gained access to a custom object record through Apex managed sharing do not lose access to it when its owner is changed, a Salesforce architect should recommend creating a specific Apex Sharing Reason for the custom object. This ensures that the sharing reason is independent of record ownership and therefore remains intact when the owner changes.

Discussion

3 comments
Sign in to comment
OosonOption: B
Jul 28, 2023

B. A way to grant access that won't be removed when the owner changes is by using Apex to create Share records with a specific "RowCause" or Sharing Reason.

BorisBorisOption: C
Jul 25, 2023

C. When Apex managed sharing is used, it allows you to programmatically share records with other users or groups based on specific criteria. However, this sharing mechanism is not automatically maintained when the owner of a record changes. Therefore, to retain the shared access even if the owner changes, a new sharing entry with RowCause set to "Manual" should be created in the _Share object. This way, the sharing entry becomes independent of the record owner and is not affected by ownership changes.

_Orva
Aug 20, 2023

Manual shares written using Apex contains RowCause="Manual" by default. Only shares with this condition are removed when ownership changes. B.

BlackFox91Option: B
Jun 20, 2024

It's B, if you set a specific rowCause, sharing won't be removed. C is valid but it's a waste of time