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?
A.
Use “With Sharing” keyword to make sure record visibility will be considered.
B.
Create a specific Apex Sharing Reason for the custom object.
C.
Create a new record in _Share object with RowCause “Manual”.
D.
Use “runAs” system method in Apex classes to enforce visibility.
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.
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.
Manual shares written using Apex contains RowCause="Manual" by default. Only shares with this condition are removed when ownership changes. B.
upvoted 6 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Ooson
Highly Voted 1 year, 3 months agoBlackFox91
Most Recent 4 months, 3 weeks agoBorisBoris
1 year, 3 months ago_Orva
1 year, 2 months ago