feat: add record limit and offset to update records - #1988
Open
paustint wants to merge 1 commit into
Open
Conversation
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
Contributor
There was a problem hiding this comment.
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
LIMITandOFFSET, 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 }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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