How to Dynamically Change Service URLs in GeneXus 18 Upgrade 7 for Java/Android Applications?

53 views Asked by At

I'm working with a GeneXus application (GeneXus 18 Upgrade 7), targeting Java / Android. The application operates correctly with a single services URL, but now I need to enable it to work with multiple service URLs by leveraging the Dynamic Services URL property (https://wiki.genexus.com/commwiki/wiki?20366,Dynamic+Services+URL+property).

In a Panel object, I retrieve the current URL in the ClientStart event using the Network external object (https://wiki.genexus.com/commwiki/wiki?31310,Network+external+object).

Then, I display the retrieved URL and have a button tied to a user event that essentially does:

Event ClientStart
    &Url = Network.ApplicationServerURL
EndEvent

// Request &URL on screen
Event 'Change URL'
composite
     Network.SetApplicationServerURL(&Url)
endcomposite
EndEvent
  • I set the Dynamic Service URL property to True.
  • I placed the Panel in the "Services URL Configuration Panel" property.
  • I performed a Build All.

Despite this setup, the application does not seem to use or change to the new URL after updating it through the 'Change URL' event. It behaves as if it's still operating with the original URL.

Has anyone encountered this issue or can provide insight into why the application does not reflect the URL change? Is there a step I'm missing or an alternative approach to dynamically manage service URLs in GeneXus applications?

0

There are 0 answers