web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Need Help with Browser-Based Session & Page Refresh Flow in Business Central

(4) ShareShare
ReportReport
Posted on by 147

Hi experts,
I have an interesting requirement in Business Central. On a card page, there is an action button that opens a browser-based session in a new tab or window.


 

Once the user submits data in this browser session, a Power Automate flow runs and inserts data into a specific table in Business Central.
Now, here’s the issue:
As soon as the data is inserted into the table, I need to:

  • Refresh the original card page, and
  • Open a Purchase Order page.

I’ve tried a couple of approaches (screenshots attached), but none of them are working as expected.



The card page doesn't refresh properly.
The PO page opens before the refresh is completed.

Also, I can’t trigger this directly from the card page, because once I click the action and the browser session opens, the redirect causes loss of control over the current session.

Is there any best practice or reliable way to handle this kind of scenario?

I have the same question (0)
  • DAnny3211 Profile Picture
    11,397 on at

    Hi there,

    This is a very interesting scenario, and I understand the challenge you're facing with session control and timing between page refresh and navigation.

    Here are a few suggestions that might help:

    1. Use a Polling Mechanism in Business Central

    Since the Power Automate flow inserts data asynchronously, you could implement a lightweight polling mechanism on the card page using AL code. This would periodically check for the presence of the new data and trigger a refresh or navigation once the condition is met.

    2. Leverage JavaScript Add-ins

    If you're using a browser-based session, consider using a JavaScript control add-in. This can help you:

    • Maintain control over the session.
    • Trigger a refresh of the card page.
    • Open another page (like the Purchase Order) after confirming the refresh is complete.

    You can use window.open() for the PO page and location.reload() for the card page, but ensure the timing is managed correctly—perhaps using Promises or async/await logic in JS.

    3. Split the Flow Logic

    Instead of trying to do both actions in one go, consider splitting the logic:

    • First, let the Power Automate flow insert the data.
    • Then, have a separate trigger (e.g., a button or a timed event) on the card page that checks for the inserted data and opens the PO page only after confirming the refresh.

    4. Use a Message Queue or SignalR

    For more advanced scenarios, you could use a message queue or real-time communication (like SignalR) to notify the client when the data insertion is complete. This would allow the card page to react in real time without polling.


    Let me know if you'd like help with implementing any of these approaches or if you can share more details about the environment you're working in (e.g., AL, extensions, JS add-ins).

    If this answer was helpful, please consider marking it as accepted.
    Best of luck with your integration!

    Warm regards,
    Daniele

  • RK-29050523-0 Profile Picture
    147 on at
    Hi Danny3211, I was also thinking of making a JS Add-in. Before that, I just want to check out the best approaches from community experts
    thanks ..
  • BC-3PO Profile Picture
    2 on at
    Maybe “RefreshOnActivate” property on the Page can help with it? 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans