Notifications
Announcements
No record found.
Hi,
I am opening URL from D365 F&O using Browser class in the Form button click.
browser().navigate("URL", true);
When I am performing the button click again it should close the existing tab (URL) in browser and it should navigate to new the tab. Is it possible to close the web browser tab using X++ code in D365 F&O?
Thank you in advance.
Nope, I don't think so. D365FO doesn't have any hook / link to the newly opened tab. It's easy for the system to ask the browser to open one new tab. But to close a specific tab - even if technically possible - you should have some pointer to that tab or you could not tell which tab to close.
Basically the user can close the tab when they don't need it anymore.
Hi NagarajanRajan,
Not sure if I understood your requirement completely, but if you want to open details in a new tab and close the old tab, can you then just simply use browser().navigate("URL", false) to open the new page in the current tab?
Hi André,
Thanks for you response.
If I use browser().navigate("URL", false) , it is opening the URL in the same D365 F&O tab. So the next time I have to go back to F&O to perform button click again. (It is fetching some data from F&O to the URL)
The requirement here is whenever we are performing the button click it should open new tab and previously opened tab should be closed (It is like refreshing the URL every time). Because of too many opened tabs in browser, it is creating confusion to the users and users are not ready to close it manually :)
as mentioned before, this is not possible.
You can either open the URL in the existing browser tab, or a new one. But you can't afterwards close browser tab(s) that were opened from some specific D365FO session. D365FO simply doesn't have any way of knowing / accessing those tabs. It simply sent a request "browser, please open this URL in a new tab" and that's it. The browser didn't reply "ok, here's some unique ID for the tab, and you can later close it if you know this id".
It's a "fire and forget" kind of call.
Can you explain your business requirement? What are these new URLs that you are launching?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional