768
Views
4
Comments
What's the URL to the current Screen?
Question
Hello -

Odd little issue. I need to get the URL to the *currently executing screen* (not the requested screen, which is what HTTPRequestHandler\GetURL() gives). The problem is, if you use a Screen as a destination in an Action, and in that second screen you call "GetURL()", you get the URL to the first screen due to the transfer.

Any ideas?

Thanks!

J.Ja
2011-08-23 22-04-05
Tiago Simões
Staff
Hi Justin,

You can take a look into GetBookmarkableURL() built-in function or use HTTPRequestHandler.GetPageName() to create it.

Cheers,
Tiago Simões
2025-11-03 12-56-18
Evert van der Zalm
 
MVP
Hello Justin,

What Tiago is saying is correct only take note that you need to use the GetBookmarableURL in the preparation of the screen. Only there you also get the input pars in you're URL.

If you need the URL in another action (then perp.) save it to a local variable.

Kind Regards,
Evert
2019-11-12 17-31-26
Justin James
 
MVP
That worked perfectly, thanks! Solved one of my most obvious and annoying bugs. :)

J.Ja
2025-11-03 12-56-18
Evert van der Zalm
 
MVP

It also did for me :).

I first solved the problem by adding a EntryPoint and used the getEntryUrl to get the url and set the input parameters. Then use redirectURL to go to the screen.

But this is much better (and little bit quicker).

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