05-25-2022 08:59 AM - last edited on 05-25-2023 06:58 AM by JackLacava
Hi, this might sounds like a stupid question to the more experienced people in the community, but how do I refer to the workflow variables from within an extensibility business rule?
These 2 lines of code are of course not working:
Dim sScenario As String = |WFScenario|
Dim sTime As String = |WFTime|
Any hint? Thank you
Solved! Go to Solution.
05-25-2022 09:53 AM
Thank you very much!
Small correction to what you have written on the Time dimension, this is the working syntax:
Dim sScenario As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
Dim sTime As String = BRApi.Finance.Time.GetNameFromId(si, si.WorkflowClusterPk.TimeKey)
05-25-2022 09:35 AM - edited 05-25-2022 09:36 AM
You are using substitution variables which will not work in Business Rules.
Try the following for the current Workflow Time and Scenario:
Dim sTime As String = BRApi.Finance.Time.GetNameFromId(si, api.WorkflowUnitPk.TimeKey)
Dim sScenario As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
05-25-2022 09:53 AM
Thank you very much!
Small correction to what you have written on the Time dimension, this is the working syntax:
Dim sScenario As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
Dim sTime As String = BRApi.Finance.Time.GetNameFromId(si, si.WorkflowClusterPk.TimeKey)
05-25-2022 10:10 AM
No problem.
If you haven't already done so, install the Snippets Editor from the MarketPlace. It comes with various examples that might come in useful.