09-07-2022 01:26 PM - last edited on 05-02-2023 10:07 AM by JackLacava
I want to implement a Data Management that read and modifies data from the cube. The only problem is that the rule type Extensibility Rule does't have the option api.Data to be able to acces to the data from the cube. I'm tring to create a Finance rule that is called by an Extensibility Rule. Here is the example:
But I get the error: 1) Error at line 33: Value of type 'ExtenderArgs' cannot be converted to 'FinanceRulesArgs'.
¿Can I call a finance rule directly from a dashboard or from a data management? ¿Is posible to call a Finance rule from a Extensibility Rule like I'm tring to do? ¿There are some Imports that I can use to be able to use api.Data in a Extensibility Rule?
Thank you! And hope that this helps some people!
09-08-2022 06:01 AM
I can use BRApi.Finance.Data.GetDataCellUsingMemberScript() and BRApi.Finance.Data.GetDataCellUsingMemberScript(). With this funtions I can do it directly with an Extencibility Rule not needing a Finance Rule.
09-08-2022 06:03 AM
Sorry I was meaning BRApi.Finance.Data.GetDataCellUsingMemberScript() and BRApi.Finance.Data.SetDataCellsUsingMemberScript()
09-21-2022 03:36 PM
Is there something similar that can be done with the Args as well? I need to use a ConfirmationRuleArgs value in an Externder rule, but I haven't been able to make it work.
09-21-2022 04:14 PM
You can use the ConfirmRuleInstanceInfo class to be able to have acces to the values that you need to use in your Extender rule.
09-21-2022 04:52 PM
Thanks for the feedback, but would you have an example of the syntax used with that, or a place I could find it? I have never used that before.
09-28-2022 11:33 AM
You can execute a Custom Calculate from an extensibility rule using the following call.
BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, brName, functionName, nameValuePairs, timeType)
Hope this helps.
09-28-2022 02:01 PM
Thanks for your answer.
In case helps someone I found out another solution:
I've used brapi.Utilities.ExecuteDataMgmtSequence(si, "DataManagemente_Name", Params) function. From an Extensibility Rule I use that function to call a data management that executes a Custom Calculated data management that executes a finence rule. It looks the same as your solution but with more steps.