Skip to content

Chunk Size #18

@pgajek2

Description

@pgajek2

Is your feature request related to a problem? Please describe.
When Flows or Triggers are poorly designed, creating or updating a large number of records at once can lead to limit exceptions.

Describe the solution you'd like
I would like to be able to specify .chunkSize() or .commitWork(size), even if this approach results in more DML operations within the current transaction.

List<Account> accounts = [....]; // 1000 accounts

new DML()
  .toInsert(accounts)
  .chunkSize(50)
  .commitWork();

new DML()
  .toInsert(accounts)
  .commitWork(50);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions