Link: Navigate and call screen action

Link: Navigate and call screen action

Hi all,

I have a scenario where I need to navigate to a new page in a new tab (a link with Navigate action, and href/target extended properties). But at the same time I need to call a screen action in order to save some data. I realized you can't have both, so ended up creating an invisible link which is clicked via JavaScript during the screen action I set to the link. So the flow looks like this:

link -> screen action -> save data -> RunJavaScript -> click on invisible link

This technically works, but since the original click event is not the one attempting to click the link, I get a popup warning on the browser, which is not acceptable. Since OutSystems generates the inline onclick event with return false, I've been having trouble manipulating the element to do two things - navigate, and call my screen action, or allow the event to propogate so a parent element can take care of what the other can't do.

Any ideas or work-arounds would be very helpful, how can I get a link to navigate a new tab and call a screen action without any popup warnings?

Thanks in advance.
I think I found a reasonable solution; its still not optimal, but I guess it works. Instead of the hidden link to navigate to a new tab (which causes popup warnings), I'm using the 'development/JS' web-block to attach new events to the same links which are calling my screen action. So now the event navigating to the new tab is the same event which is calling the screen action. Again... it works technically, but I really would like the ability to call a screen action on a link with Navigate on-click method.

Still open to ideas if anyone has a less hacky solution to this.