Closed adtungadi closed 6 months ago
G'day @adtungadi -- Thanks for opening this PR. We have reviewed the change and have decided against merging this into the code base. The reasons for this decision are that we see Salesforce's User mode is the better approach to manage this need and Class-based sharing declarations are not as preferred by Salesforce now. We also have reservations about causing unnecessary confusion with the Apex Common user base as the UOW is one of the foundational elements of the framework and we don't wish to deviate from Salesforce's direction in this question. Again, thank you for your help and suggestion with this change. We do appreciate it. Cheers!
Since unit of work class has no sharing declaration, it would inherit the sharing of the calling class regardless of it running in system mode. This change gives a flexibility to set the uow sharing mode, independent of the calling class.
This change is![Reviewable](https://reviewable.io/review_button.svg)