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

MVP
In reply to: Sebastian Gębuś

Hi!
I have no experience with farms and I don't know if this is what you are asking, but if you are referring to the portal address that you configure in the installer, you can find it in Config database in the GlobalParameters table :)

SELECT PRM_Name, PRM_Value FROM GlobalParameters WHERE PRM_ID in (28,29)

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