Hi all,
I am encountering false errors that seem to be caused by a race condition in my flow. I have a flow that adds quote line items to a quote in Salesforce. Before adding the new quote line items, the flow checks if the quote already has line items. If there are existing line items, the next step deletes them, and the final step adds the new line items.
The process works as expected: the line items are successfully deleted and added in Salesforce. However, the delete flow still generates errors:
Errors:
In the last two flow steps, I also included a concurrency lock template to prevent potential race conditions:
The json of a quote line items looks as follows:
{
"attributes": {
"type": "QuoteLineItem",
"url": "/services/data/v54.0/sobjects/QuoteLineItem/0QLUW000001aFcg4AE"
},
"Id": "0QLUW000001aFcg4AE",
"Quantity": 22,
"UnitPrice": 36.8,
"Quote": {
"attributes": {
"type": "Quote",
"url": "/services/data/v54.0/sobjects/Quote/0Q0UW0000000CPN0A2"
},
"Invoice_BC_Id__c": "2CFA6836-078F-EE11-8178-000D3A1455C0"
}
Any help would be appreciated!