Forum Discussion
bhandelman
3 years agoNew Contributor III
How to identify which environment a BR is running in?
I have some business rules that need to identify which environment the BR is running in. This is because they does different things in each environment. In one BR i want the process to run in Prod bu...
- 3 years ago
You could retrieve the connection URL using,
si.WebServerUrlUsedByClient& differentiate the Environment by identifying specific keywords (Dev/Stage/Prod) in it.
TT
1 year agoNew Contributor III
I need to use the environment name defined in the "Environment Name" variable in System tab, I need to use it in business rule. I need to use "FPCC_NonProd" in the business rule.
Can you please suggest how can I use ?
- JussiPukki1 year agoContributor
At least you can find it it in the ServerConfig table in Framework database.
Dim sql As String = " SELECT TOP 1 TextValue FROM ServerConfig WHERE ItemName2 = 'EnvironmentName' " Using dbConnFW As DBConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si) Using dt As DataTable = BRAPi.Database.ExecuteSql(dbConnFW, sql, True) If Not dt Is Nothing Then BRApi.ErrorLog.LogMessage(si, dt.Rows(0).Item("TextValue")) End If End Using End UsingNot sure if there's a smarter way.
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
- 2 years ago