Hi All,
I have 2 dataverse tables (Flights and Bookings) and 1 virtual table in Azure SQL (Flights). I want to create a lookup on the bookings table to point to the flights virtual table, to replace the old dataverse flights lookup. Both flights tables are the same, except the PK for virtual table is a new guid.
What would be the best way to create an automation to update all the new lookups to point to the relevant record in the virtual table, which has a matching key to the original flights dataverse table?
I considered using power automate, calling FetchXML and doing joins between all 3 tables, then running an update record on each record returned in the fetchxml result. When using fetchXml, I can't seem to look at the dataverse table and virtual table at the same time. The flow doesn't throw any errors, but it doesn't include any of the virtual tables columns.
Here is some fetchml xml where I have tried to join the 2 flight tables in a list rows action, but only the columns from cr88e_flight_old are returned.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="cr88e_flight_old">
<all-attributes />
<link-entity name="rbq_tempflights" to="cr88e_flightid" from="rbq_flightid" link-type="outer">
<all-attributes />
</link-entity>
</entity>
</fetch>