createRecordInputFilteredByEditedFields(recordInput, originalRecord)

Creates a RecordInput object with a list of fields that have been edited from their original values to pass in a call to updateRecord(recordInput).

Syntax 

1import { createRecordInputFilteredByEditedFields } from 'lightning/uiRecordApi';
2createRecordInputFilteredByEditedFields(recordInput: Record, originalRecord: Record): Record

User Interface API Resource 

1PATCH /ui-api/records/{recordId}

createRecordInputFilteredByEditedFields uses this User Interface API resource, but doesn’t support all its parameters.

Parameters 

Parameter NameTypeDescriptionRequired?
recordInputObjectA RecordInput object to filter.Yes
originalRecordObjectA Record object that contains the original field values.Yes

Returns 

An object with a list of fields that have been edited from their original values (excluding Id which is always included).

Release Preview

This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.