Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function ldsUpdateRecord(newRecord, originalRecord, objectInfo) {
newRecord.id = originalRecord.id;
newRecord.apiName = null;
const newRecordEdit = generateRecordInputForUpdate(
normalizeRecord(newRecord),
objectInfo
);
const recordToSave = createRecordInputFilteredByEditedFields(
newRecordEdit,
originalRecord
);
return updateRecord(recordToSave);
}