Skip to main content
September 7, 2022

Use a Finance Rule in a Data Management

  • September 7, 2022
  • 2 replies
  • 0 views

Hi All!

 

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:

Captura.PNGCaptura2.PNG

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!

2 replies

VRoigAuthor
September 8, 2022

Hi!

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.

 

Thanks!!

VRoigAuthor
September 8, 2022

Sorry I was meaning BRApi.Finance.Data.GetDataCellUsingMemberScript() and BRApi.Finance.Data.SetDataCellsUsingMemberScript()

September 21, 2022

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.

 

Thanks,

Tom

September 28, 2022

Hey Vicent, 

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.

Thanks,

Sam

 

VRoigAuthor
September 28, 2022

Hi SRichards,

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.

Thanks,
Vicent