Hi everyone,
I have imported invoices from a different system to Dynamics 365 sales hub. These invoices have a field "customer number", which was also imported into a custom field.
We have also imported our customers from this old system. The customer number is also a custom field in the account entity.
The invoice entity has a relationship to the account entity and right now I am trying to link these to together with Microsoft Flows. I have already created a flow, but the result is not as expected.
My flow logic is:
Starts when a invoice is created or updated -->
checks if the account number field in the record is not empty -->
if not empty, Get a list of Account records where the customer number is the same, limit the result to one entry -->
foreach entry in list update the original invoice record, add the account id to the customer relationship (parameter value) and add the default pricelist (hardcoded value).
Here is a screenshot of the flow:
(Web Interface is unfortunately in german, but I have commented everything with english terms)
When I run the flow, it runs with success but in the end, the particular record is not updated at all. In my understanding the flow should work and I have no clue what is wrong with it.
When the flow is executed it shows the following:

From my perspective it should work but it doesnt. Could anyone lead me to a working solution?
Thanks for your help!
Kind regards from Vienna







