Skip to content

feat: add record limit and offset to update records - #1988

Open
paustint wants to merge 1 commit into
mainfrom
feat/1030-add-limit-record-update
Open

feat: add record limit and offset to update records#1988
paustint wants to merge 1 commit into
mainfrom
feat/1030-add-limit-record-update

Conversation

@paustint

Copy link
Copy Markdown
Contributor

Updating records without a file had no way to work on a subset of an object. Every matching record is queried into the browser before anything is submitted, so a user with 9M records could not use the tool at all.

Each object now takes an optional maximum number of records to update and a number of records to skip, which lets a large data volume be worked through a chunk at a time. Both are applied to the SOQL rather than filtering client side, so the validated impacted record count, the Download Records button and the update itself all see the identical set.

Closes #1030

Updating records without a file had no way to work on a subset of an
object. Every matching record is queried into the browser before anything
is submitted, so a user with 9M records could not use the tool at all.

Each object now takes an optional maximum number of records to update and
a number of records to skip, which lets a large data volume be worked
through a chunk at a time. Both are applied to the SOQL rather than
filtering client side, so the validated impacted record count, the
Download Records button and the update itself all see the identical set.

Closes #1030
Copilot AI lite review requested due to automatic review settings August 22, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-object record windowing to the “Update Records Without a File” flow so large data volumes can be processed incrementally, with validation, preview/download, and the actual update operating on the same SOQL-scoped record set (closes #1030).

Changes:

  • Introduces optional per-object SOQL LIMIT and OFFSET, including UI inputs and validation.
  • Refactors record fetching so validation preview/download and deployment share the same query path (including mixed custom criteria handling).
  • Records limit/offset in data-history entries and surfaces them in deployment status messaging and history config display.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/shared/ui-core/src/mass-update-records/useDeployRecords.ts Plumbs limit/offset into history capture and analytics flags for submissions.
libs/shared/ui-core/src/mass-update-records/MassUpdateRecordsObjectRowLimit.tsx New UI component for per-object limit/offset inputs with inline validation messaging.
libs/shared/ui-core/src/mass-update-records/MassUpdateRecordsObjectRow.tsx Uses shared query path for “Download Records” preview and conditionally renders limit/offset controls.
libs/shared/ui-core/src/mass-update-records/MassUpdateRecordsDeploymentRow.tsx Displays effective limit/offset context before processing starts.
libs/shared/ui-core/src/mass-update-records/mass-update-records.utils.tsx Implements limit/offset normalization, query composition, and windowed querying for mixed criteria.
libs/shared/ui-core/src/mass-update-records/mass-update-records.types.tsx Extends MetadataRow with optional limit/offset and adds a shared RecordLimitAndOffset type.
libs/shared/ui-core/src/mass-update-records/data-history-capture.ts Captures limit/offset into data-history config for accurate historical context.
libs/shared/ui-core/src/mass-update-records/tests/MassUpdateRecordsObjectRowLimit.spec.tsx Adds unit tests for the new limit/offset input component behavior and errors.
libs/shared/ui-core/src/mass-update-records/tests/mass-update-records.utils.spec.ts Adds extensive tests for query composition and windowed querying semantics with limit/offset.
libs/shared/ui-core/src/index.ts Exports the new MassUpdateRecordsObjectRowLimit component from the ui-core barrel.
libs/features/update-records/src/selection/useMassUpdateFieldItems.ts Adds state + reducer action to store per-object limit/offset and invalidate prior validation results when changed.
libs/features/update-records/src/selection/MassUpdateRecordsSelection.tsx Wires handleRecordLimitChange through selection-level component tree.
libs/features/update-records/src/selection/MassUpdateRecordsObjects.tsx Threads limit/offset change handler down to per-object components.
libs/features/update-records/src/selection/MassUpdateRecordsObject.tsx Passes row limit/offset into MassUpdateRecordsObjectRow and dispatches updates upward.
libs/features/update-records/src/deployment/MassUpdateRecordsDeployment.tsx Passes limit/offset into deployment row rendering for user visibility.
libs/features/data-history/src/lib/data-history-page.utils.ts Adds display fields for recordLimit/recordOffset in history config UI.
apps/docs/docs/load/update-records.mdx Documents the new limit/offset behavior, constraints, and suggested chunking workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +323 to +327
const { limit, offset } = getEffectiveRecordLimit(row);
const customWhereClause = getCustomCriteriaWhereClause(row);

if (limit || offset) {
const windowQuery = composeSoqlQueryOptionalCustomWhereClause(row, fields, { includeCustom: true });
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

Successfully merging this pull request may close these issues.

Large data volumes when doing a large data update without a file

2 participants