Hello,
I have a main entity (Products) and a child entity (Tasks). What I need to happen is when I create a new item within the Products lists, my Power App creates a collection from static data sitting in SP and creates new records in my Tasks entity. This then gives the record in the Product entity and all of the ones created in the Tasks entity matching ID's (the auto-generated ID from the Products entity is patched to a Text field in the Tasks entity.
I have got most of this working by creating a collection and then doing a ForAll patch, however the problem is because I am submitting the Products list and trying to create new Tasks at the same time, it isn't always grabbing the ID properly. I have tried putting the data into an 8 second timer but even still this is missing some of the ID's. The other issue with doing this is it has to hold onto a loading screen for 8 seconds which isn't a great customer journey.
What is the best way to either:
a) grab the ID from the most recent record but make sure the record has hit the source or;
b) use the relationships on CDS to somehow recognise it is the same case
Thanks