Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

Posted on by 55

Hi there,

We have several Business Central Power Automate Approval Flows which we created in the customer's Production and UAT environments. Recently, we refreshed UAT with the data from Production. Since then, when we trigger a Power Automate Flow from Business Central in the UAT environment, the flow is executing in the Production environment instead of UAT. I have verified that the Power Automate connectors are pointing to the correct environment, but I can't figure out where in Business Central you can update the flows to point to the correct environment.

Can anyone explain where the environment linkage information is stored between Business Central and Power Automate Flows? 

My only workaround is to delete the flows in UAT and recreate them.

Categories:
  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Great work, thank you for sharing final outcome / solution.

  • Suggested answer
    Craig Day Profile Picture
    Craig Day 55 on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    UPDATE: We finally discovered a solution to this issue, which was simpler than we would have expected. Here is the process to get your flows connected properly after refreshing a Business Central environment:

    1. In the refreshed environment in Business Central, open the "Workflows" page. Delete all of the Power Automate workflows that are present (they will have been copied over from the environment you refreshed from). If you cannot delete them due to active workflow instances, disable and rename them.

    2. Open the "Manage Power Automate Flows" page. Update to the correct environment by selecting Configuration > Select Environment

    3. After changing the environment, you should see your existing Power Automate flows that you need to re-link to this refreshed environment

    4. For each flow, disable the flow, then enable it again. This action generates entries in the Workflow table and the Webhook Subscriptions table in Business Central, which is what you need for Business Central to recognize it properly.

    Your existing flows should now be properly connected to your refreshed Business Central environment!

    Cheers,

    Craig

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Hello Craig,

    Thank you for letting me know. It could be, we sometimes see this in the Office 365 portal as well, that the shown configuration in the portal does not match what is really enabled / disabled. It may be cached which can be very frustrating for support engineer / partner / end customer.

    Thank you.

  • Craig Day Profile Picture
    Craig Day 55 on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Thanks, Marco. I ended up recreated them, so it will remain a mystery for now. I may raise a ticket with Microsoft.

    Cheers,

    Craig

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Hello,

    You are right, it is not there. You can perhaps search for Manage Power Automate Flows and in Configuration, you can select the environment. There may be two or more and one can be enabled. I assume the wrong one is still enabled?

    Hope it helps. If not, ask your partner or CSP to raise a support request to Microsoft.

    Thanks.

  • Craig Day Profile Picture
    Craig Day 55 on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Hi Marco,

    Thanks for your reply. I exported the file to XML but did not see any indications within it as to which environment it is associated with. I tried deleting that flow from UAT and recreating it, and the new XML is virtually identical aside from different Workflow Step IDs.

    Can you please elaborate on what I am looking for within the XML file to determine which Power Automate environment it is looking at?

    Thanks,

    Craig 

    pastedimage1647447615806v1.png 

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Business Central Flows are triggering in the wrong Power Automate Environment after refreshing UAT

    Hello,

    You can export the work flows to a xml file from BC and verify it from there.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans