Pull in Variables from another BR
I'm trying to call a helper BR that I wrote to pull in two variables to denote our environment, but I'm getting an error message saying the extender business rule.MainClass is undefined.
Background: Our GL has three environments, Dev, Prj (test) and PRD. As we promoted projects up in OneStream, I have to edit the BRs to reference the different environments. It's a pain when it comes to the SQL because the environment is part of the tableName.fieldName.
Goal: to have one helper BR that has the environment variables in it and all other BRs reference this rule so I no longer need to edit them from environment to environment. The helper rule in DEV would reference the DEV tables, the helper in PRD would reference the production tables, etc.
'test code to pull in environment variables from a Helper 03-05-2026
'Define reference to business rule
Dim JDE_EnvironmentHelper As New OneStream.BusinessRule.Extender.JDE_EnvironmentHelper.MainClass '<-- Update ReferencedBRName with your Business Rule
'Call function within referenced business rule
If Not JDE_EnvironmentHelper Is Nothing Then
Dim returnVariable As String = JDE_EnvironmentHelper.GetConnectionString(si, gateWay, envTbl) '<-- Update ReferencedBRFunctionName, param1..paramX, returnVariable type
End If
' End test code 03-05-2026
The above code* is from the Connector rule that is to receive the variables, gateWay and envTbl. The error I get when I validate it is:
- Error at line 37: Type 'OneStream.BusinessRule.Extender.JDE_EnvironmentHelper.MainClass' is not defined.
This code is directly copied from the OneStream snippets (modified for my BR name, of course)
What am I doing wrong? Am I even on the right track?
*line 3 above is line 37 in my BR