02-01-2024 10:50 AM - last edited on 02-01-2024 11:05 AM by JackLacava
Hi, Is there a way to perform a force consolidate in a BR? since running a datamgmtsequence isn't working properly for me. Example:
Select Case api.FunctionType
Case Is = FinanceFunctionType.CustomCalculate
'If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Test") Then
'api.Data.Calculate("A#Profit = A#Sales - A#Costs")
'End If
brapi.utilities.ExecuteDataMgmtSequence(si, "PLN_Consolidate_AnyScenario", Nothing)
End Select
And with this, the consolidation doesn't run; I'm not sure if I'm missing sending information or something like that.
Solved! Go to Solution.
02-01-2024 02:21 PM
Add a Step in the DM Sequence to run the Force Consolidate, as the final step. After your Custom Calculate DM Step. Data Management Sequences can have one to many steps in that Sequence.
Hope this helps,
02-01-2024 11:11 AM
Hi @Marco
The PLN_TestConsol Business Rule can then run a DM job that uses the Force. But it can not be done directly in the CustomCalculate.
02-01-2024 11:16 AM
So what kind of BR do you recommend for running that? Since I also use a sequence to execute this BR.
02-01-2024 02:21 PM
Add a Step in the DM Sequence to run the Force Consolidate, as the final step. After your Custom Calculate DM Step. Data Management Sequences can have one to many steps in that Sequence.
Hope this helps,
02-01-2024 02:38 PM
I see at least two problems:
First, in your ExecuteDataManagementSequence() call to you are passing Nothing where you should be passing in a Dictionary(Of String,String) of resolved Dashboard Parameter values. Without which |!PLN_ParamWFScenario!| will not resolve to anything when OS attempts to run the DM Sequence.
Second, it looks like you are trying to execute a DM Sequence from within a CustomCalculate. While you can technically invoke a DM Sequence from anywhere, I'm not sure it makes any sense to do so from within a CustomCalculate. I would think a far better approach would be to add the PLN_Consolidate_AnyScenario DM Sequence Steps to the DM Package that was actually invoking the CustomCalculate.