Home > Forum > General > Portal Url (dynamically) vs. Global Constant

Portal Url (dynamically) vs. Global Constant
0

Hi community!


We have 2 Webcon farms (DEV/TEST/PROD) with the same application (6 servers in total).

Our deployment chain is from Farm1 (DEV), which is the application source to all other servers.

We have defined a global constant for Portal Url, which is used in whole application (for redirects and so on).

This scenario works fine on one farm.


Is it possible to find out within a businessrule (or maybe SDK rule), which BaseUrl current system has?

I do not find anything in context variables, so that's why I'm asking...

Thanks a lot in advance & best regards, Nik

In reply to: Daniel Krüger (Cosmo Consult)

Hi Nik,

if for some reason this is not sufficient, you could create a SDK action. Here's an example for extracting different parts of the URL.

Documentation:
https://daniels-notes.de/posts/2022/add-new-choice-field-value-without-leaving-the-page#geturlvalue-sdk-action

Code:
https://github.com/Daniel-Krueger/webcon_cclsactions/tree/main/CCLSActions/GetUrlValue

Best regards,
Daniel

Hi Sebastian & Daniel!

Thanks for pushing me into the right direction, that was very helpful.

Since name of Config DB varies throughout the systems, one has to read first the name of Config DB from current BPS database.

I came up with the attached solution, which works fine on every server.

Best regards, Nik

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings