lwc-utils icon indicating copy to clipboard operation
lwc-utils copied to clipboard

SOQL Datatable Flow Action: Error when updating records in collection

Open solo-1234 opened this issue 2 years ago • 0 comments

Hi! I have a soql datatable (embedded in flexipage) that passes selected records to a flow action. The flow loops through the selectedRecords, modifies a field on each, adds it to a new collection, and then tries to update the new collection.

In this use case the datatable contains fields from parent (lookup) records. When I try to run the Update Records I get an error: INVALID_FIELD_FOR_INSERT_UPDATE: Object__c: bad field names on insert/update call: Lookup_field__r

My current workaround is to use apex to requery the selectedRecords.

solo-1234 avatar Feb 22 '22 16:02 solo-1234