I am trying to do a conditional, multi-level deep clone based on a hierarchy of template records.
The conditional part means that if the target record exists, then I do not update/overwrite it. I am doing the "Is Exists?" inside a loop and now getting error Too many Queries: 101 governor limit.
The flow works just fine if the number of records in the tree is small.
I am doing the Create in Bulk so that is part fine. Can't figure out an equivalent of a Map<> that I can use in flow or a equivalent of SOQL IN Clause or any other way to avoid putting the query (lookup) inside the loop.
Thanks in advance!