generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions[bot]
committed
Feb 4, 2025
1 parent
cfa9d4c
commit 0a8069d
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
### February 04, 2025 | ||
## dataxp | ||
|
||
api@a372b5a | ||
The release includes the following updates: | ||
|
||
Records with readonly configurations are now handled differently in the replaceRecords operation. A new option called excludeReadOnly has been introduced to control whether readonly records or fields should be skipped or replaced. If excludeReadOnly is set to true, records with a readonly config or fields marked as readonly will not be replaced during the replaceRecords operation. If excludeReadOnly is false or not provided, readonly records and fields will be replaced as before. | ||
|
||
The findAndReplaceRecords method in the WorkbooksService now checks if the field being replaced is readonly and throws an error if excludeReadOnly is set to true, preventing modification of readonly fields. | ||
|
||
Several new tests have been added to validate the behavior of the replaceRecords operation with readonly records and fields, covering scenarios with excludeReadOnly set to true and false. | ||
|
||
The SearchRecordsOptions and GetCellValuesOptions interfaces have been updated to include the new excludeReadOnly option. | ||
|
||
Example usage: | ||
|
||
```typescript | ||
// Replace non-readonly records or fields | ||
const records = await wb.op.replaceRecords({ | ||
sheetId: wb.contacts.id, | ||
options: {}, | ||
find: 'John', | ||
replace: 'Jonathan', | ||
field: { key: 'firstName' }, | ||
legacyReplace: false, | ||
actorId: UserId.make(), | ||
}) | ||
|
||
// Skip readonly records or fields | ||
const records = await wb.op.replaceRecords({ | ||
sheetId: wb.contacts.id, | ||
options: { excludeReadOnly: true }, | ||
find: 'John', | ||
replace: 'Jonathan', | ||
field: { key: 'firstName' }, | ||
legacyReplace: false, | ||
actorId: UserId.make(), | ||
}) | ||
``` |