Hi,
I am trying to automatically create or update records based on certain criteria from another table. It's to create invoice with line items. The process is the following:
1. if a record's date field is today, create a record in table A.
2. then find a record with the same client in the table invoice,
3. if not found, create a new client record in invoice table with a line item that is linked to the newly created record from table A.
4. If find the client, then append the line item field with the new record from table A.
The problem is that sometimes there are multiple records matched in the first step of the automation, then both try to update the line item field in the invoice table and the later automation run overwrites the previous run.
I imagine there could be problem if no client found then two clients records would be created in the invoice table. I haven't encountered it in my testing yet.
What's the recommended solution here?
Thanks!