Invalid destination data unit in script
I'm making my first attempt at using the DataBuffer to perform a data copy from a source scenario to a destination scenario. This is being done through a Data Management (DM) step and a Custom Calculate business rule. To keep things simple for this initial version, the input values are hard-coded.
Dim dbSource As DataBuffer = api.Data.GetDataBufferUsingFormula("S#Budget:T#2026M7:A#CF101:O#AdjInput:E#ES", DataApiScriptMethodType.Calculate, False)
Dim destinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("S#Forecast_Q2:T#2026M7:A#CF101:E#ES:O#AdjInput")
api.Data.SetDataBuffer(dbSource, destinationInfo,,,,,,,,,,,,,False)
Appreciate any inputs to fix this. Thanks
In your case I suspect it is your entity filter. Which i am guessing will differ to your hard coded E#ES at runtime. Maybe try just passing in a single entity and then build up your logic from there.
You can use FinanceRulesApi object to get Entity, Scenario and Time etc dynamically from what you pass in e.g api.Pov.Data.Entity.Name