Problem to mount a link

Problem to mount a link

Hi guys a have a situation that I need to open a new window tab on browser every time my client click, for this work I need to build correct path.. so I'm trying do the follow inside a Link object:
"http://"+ AddPersonalAreaToURLPath(GetOwnerURLPath() + "Predio_Edit.aspx") + "?PredioId=" + GetListaPredio.List.Current.Predio.Id
But the result aren't expected: http:///MyApp/Predio_Edit.aspx?PredioId=51

I expect recive : http://my_server/MyApp/Predio_Edit.aspx?PredioId=51

I don't know why this doesn't work because I use this in another place and I get the correct path including the name of server. Can anyone help me?

If you have entry points setup, there is an action in HttpRequestHandler called "GetEntryURL".  This resolves the name of the server and espace automatically and also includes parameters.

Hi Alexandre,

To manually build an url you should do like Rebecca said.

But, why are you manually writting a url to a page in the same eSpace? I don't see any possible reason for that.
If your problem is just opening a new window you can set a extended property on the link with "target" = "_blank", and just use a normal destination to the WebScreen. The platform will take care of the url for you.

João Rosado
Hi Alexandre,

You can use two functions together to get what you need from the
HttpRequestHandler estension:

MakeAbsoluteURL(GetEntryURL("<your Entry Point or PageName>","<your eSpace>","PredioId",GetListaPredio.List.Current.Predio.Id))

Gonçalo Martins

Hi João you have right. I test your solution and works perfectly. Hi Rebecca thanks your solutio works well too, but like João said it is not necessary to mount an external URL. Hi Gonçalo thank you also for the prompt help.
Hello there everyone,

I'm using this approach to generate an URL.
Gonçalo Martins wrote:
MakeAbsoluteURL(GetEntryURL("<your Entry Point or PageName>","<your eSpace>","PredioId",GetListaPredio.List.Current.Predio.Id))
If I'm debugging in my PTA (PrivaTe Area), my user is added to the URL, like this:


...and it is not added otherwise, as expected, like this:


And everything is just doing fine in DEV environment.

Till one day... ...
The application is published in PRD environment...
...and weird things started to happen!

I've never debugged in PRD - I repeat I'VE NEVER DEBUGGED in PRD - the platform server is in Production Mode and the link is being generated with my PTA, like this:


Of course I have an error then, 'cause that location doesn't exist.

Does this happened with anyone else? Or something similar?

I'm working with Outsystems over IIS and SQL Server (unknown versions, but I can supply later).

Thanks a lot for your ideas,
R. Saraiva