79
Views
6
Comments
 “Open link in new tab” does not open page I want to open
Question
Application Type
Reactive
Service Studio Version
11.53.43 (Build 62091)

I have a process that I want to run when I press a link in Menu, and I want the client action to run when I press the link in Menu.

Then, when I press “Open link in new tab” in Chrome, the currently opened page is opened in a new tab, the page I want to open cannot be opened.

How can I make sure that “Open link in new tab” takes me to the correct page?


This is the link in the application.

https://personal-nhsczzue.outsystemscloud.com/MoveFromMenu/


I also attach the oml.

MoveFromMenu.oml
2022-12-22 10-00-39
Beatriz Sabino

Hi Arakawa,

To open a link in a new tab, just add the target="_blank" attribute to your link.

Please note that this only works with the link widget, not with buttons.

UserImage.jpg
Arakawa Haruka

Thanks, but it doesn't work.

I am not saying that I just want to open the page on a new screen. It will open in a new tab. The problem is that the screen selected in the menu does not open, but the current screen does.

2022-12-22 10-00-39
Beatriz Sabino

I believe what's happening is that the OnDestroy event is being triggered, which in turn resets the IsMovedFromMenu2 client variable to false. When I first click the Menu2 link in the menu, everything works as expected. Do you need to have the OnDestroy event?

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Arakawa Haruka ,

When attaching a client action to a link in OutSystems, the action is triggered by JavaScript during a normal click. However, when using “Open link in new tab”, the browser relies on the link’s href attribute instead of executing the client action. If the href isn’t set correctly, the browser will reload the current page in the new tab instead of navigating to the desired screen.

To ensure the correct behavior when opening the link in a new tab, make sure the menu link has a proper screen destination:

Use a Screen Destination: Set the link’s Destination property to the appropriate screen. You can still handle any logic needed using input parameters or the screen's events (like OnReady).

Use RedirectToURL: Set the event to RedirectToURL and the URL parameter to the screen name

UserImage.jpg
Arakawa Haruka

Thank you very much.

I really need to set a Client Action instead of a Screen Destination for the link.

Additionally, I want to set the appropriate Screen in the Client Action, not in another event. Do you have any suggestions?

2026-01-28 16-57-48
Mihai Melencu
Champion


Unfortunately, client actions only run when you click the link directly, since they’re part of the page’s JavaScript. When you use “Open link in new tab,” the browser simply follows the URL in the link’s href and skips any client-side actions. This means the client action won’t run automatically in a new tab. 


Can you provide more context or specifics about your use case? 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.