Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support DMLOptions and AccessLevel for writes #29

Closed
infocynic opened this issue May 10, 2023 · 2 comments
Closed

Feature request: Support DMLOptions and AccessLevel for writes #29

infocynic opened this issue May 10, 2023 · 2 comments

Comments

@infocynic
Copy link

infocynic commented May 10, 2023

Your Repository class support SYSTEM / USER mode for queries, but not for writes (unless I missed it). Additionally, there's no clean way to set DML options for the entire batch (it has to be set on the individual SObjects).

To avoid the ugliness of having 1000 overloads, just supporting
insert(recordsToInsert, dmlOptions, accessLevel)

for example (along with the update, etc. versions) would be sufficient; the single-record use case can just wrap in a list, and the allOrNone true/false overload is redundant with being able to set that via DMLOptions.

@jamessimone
Copy link
Owner

I'd prefer one method for updating DMLOptions - I'll add that and pass the AccessLevel instance down to the DML operations as well. Thanks for pointing this out!

@jamessimone
Copy link
Owner

@infocynic thanks again for submitting this, I've updated via 95e3b31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants