How to pass data by a external url node?

From my app im redirecting the page to another app through external url and i wanted to my second app to have information from the previous app. How do i pass this data via external url?

Hi,

did you try to do something like this email example?

Solution

Hi Flavio,

If you want to pass data from App A to App B via ExternalURL action, you can create one or more input parameters for the webscreen in App B. 

Then, from App A you can pass the following value via ExternalSite URL parameter.

"https://hostname/AppB/Webscreen.aspx?InputParameter1=" + Value1 + "&InputParameter2=" + Value2 and so on...


If AppB is not an OutSystems webapplication, same idea applies only the URL to AppB will be different.


Regards,

Nordin

Solution

Thank you for the answers.

Do you know how from the second application I can "catch" this query parameters sent by the first app?

And isnt it a bad practice sending id values via url?

Flávio Monteiro wrote:

From my app im redirecting the page to another app through external url and i wanted to my second app to have information from the previous app. How do i pass this data via external url?

I presume the screen you redirect to has input parameters? Then just add these parameters to the url and it should work. The url would then look like something as the following: https://<fqdn>/screen?inputparam1=input1&inputparam2=input2

But if you want to redirect to a screen from another OutSystems applications (target) then you don't need to do it this way. Just mark the screen in the target application as Public. Reference it in the source application and use a destination widget that uses the screen from the other application. This reference is loosely coupled and unless you change the input parameters any changes in the target application will not require a deployment of the source application. 


Flávio Monteiro wrote:

Thank you for the answers.

Do you know how from the second application I can "catch" this query parameters sent by the first app?

And isnt it a bad practice sending id values via url?

This will be done automatically since they are input parameters. Just use them in your logic (either in the preparation phase or in the Events or Aggregates/Actions in Reactive)

Edit: And yes, it is a bad practise to use identifiers. It's just an example ;) 

Hi Flavio,

Could you give us some more context?

Are both applications, OutSystems applications? Because, I pressume they're not since you want to use an ExternalURL right?

Regards,

Nordin


Nordin Ahdi wrote:

Hi Flavio,

Could you give us some more context?

Are both applications, OutSystems applications? Because, I pressume they're not since you want to use an ExternalURL right?

Regards,

Nordin


No, they are both Outsystems applications. 


In addition to what Vincent said, passing 'guessable' identifiers to screens is indeed not a smart idea unless you take some precautions. If you make sure a logged in user cannot view records that belong to other users by changing the URL input parameter, then it should be fine. What you also can do is making sure the Id is 'unguessable' by using a GUID (look for GenerateGuid action in the system module) for example or by encrypting it (look for CryptoAPI component in the Forge).

Flávio Monteiro wrote:

Nordin Ahdi wrote:

Hi Flavio,

Could you give us some more context?

Are both applications, OutSystems applications? Because, I pressume they're not since you want to use an ExternalURL right?

Regards,

Nordin


No, they are both Outsystems applications. 


Ok in that case, you should go with Vincent's solution and just make the screen in AppB public and reference it from AppA.


Note that if you use a GUID as an indexed property you need to be sure to rebuild your indexes frequently to keep performance up;

one of the many sources: https://www.mssqltips.com/sqlservertip/5105/sql-server-performance-comparison-int-versus-guid/

Much appreciated for all the answers guys i will test whats the best solution considering the requirements of my app.

Good luck! And don't forget to mark the solution that helped you as Answer. This will help other find the answer quicker.

That’s what we’re here for Flavio :).