Salesforce do specify that Criteria Based Sharing is evaluated quite late in the execution context, but the documentation makes no reference to Owner Based Sharing:

From salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm:

1) Loads the original record from the database or initializes the record for an upsert.

2) Loads the new record field values from the request and overwrites the old values.

3) Executes all before triggers.

. . .

19) Executes Criteria Based Sharing evaluation.

20) Commits all DML operations to the database.

21) Executes post-commit logic, such as sending email.

So, in what part of the execution order does Owner Based Sharing evaluation occur?

1 Answer 1


Since they are owner based, they don't have to be evalated during the sequence. Criteria based however, are evaluated since the criteria need to be revisited for evaluating the sharing.

PS: I think by now you would have got the answer, but still for others posting this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .