Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Control Flow triggered at same time for different record- Control flow context

ShAn21
Tera Guru

Hi Team,

I have a tricky scenario. I have setup a flow on insert of record to Table A.

Once the record is inserted, I insert/update table B based on the unique 'Field A' in Table B.

If the Table B already has a record with field A then the record needs to be updated and not inserted.

 

But what I see is that 2 records are inserted at the same time in table A with same Field A and hence 2 records gets inserted to Table B.

 

Both inserts/flow contexts all have exact same timing and all the checks fail and end up creating 2 records. All checks in flows fail.

 

BR seems a bit tricky as this insert is only a small part of a big flow and I dont want the flow to error out.

 

Is there any best way to control this in flow layer? Any help is appreciated.

 

Regards

1 REPLY 1

harshav
Tera Guru

Can you please be more specific with the table names and field names. also if possible please share your code here.