cancel
Showing results for 
Search instead for 
Did you mean: 

Use a Finance Rule in a Data Management

VRoig
New Contributor II

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!

7 REPLIES 7

VRoig
New Contributor II

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!!

VRoig
New Contributor II

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

Tom_R
New Contributor II

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

VRoig
New Contributor II

Hi Tom,

You can use the ConfirmRuleInstanceInfo class to be able to have acces to the values that you need to use in your Extender rule.

 

Vicent

Tom_R
New Contributor II

Hi Vicent, 

 

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.

 

Thanks,

Tom

SamRichards
Contributor

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

 

VRoig
New Contributor II

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