Forum Discussion
Omkareshwar
2 years agoContributor II
Hi Calvin,
You can use this syntax to call the XFBR business rule.
BRString(YourRuleName, YourFunctionName)
You can use this syntax to debug BRapi.ErrorLog.LogMessage(si, "Message You want to print on the errorlog", "")
If args.FunctionName.XFEqualsIgnoreCase("YourFunctionName") Then
Dim myWorkflowUnitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si)
Dim wfYear As Integer = BRApi.Finance.Time.GetYearFromId(si, myWorkflowUnitPk.TimeKey)
Dim wfScenarioName As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
If wfScenarioName.XFContainsIgnoreCase("Jan")
Return $"{wfYear}M1"
Else If wfScenarioName.XFContainsIgnoreCase("Feb")
Return $"{wfYear}M2"
End If
End If
You can use the above function for your use case you can modify it as per your specific requirement.
Thanks, Omkareshwar
Archetype Consulting
Related Content
- 2 years ago