Forum Discussion

VRoig's avatar
VRoig
New Contributor II
3 years ago

Use a Finance Rule in a Data Management

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:

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!

  • 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's avatar
      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

       

  • VRoig's avatar
    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's avatar
      VRoig
      New Contributor II

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

      • Tom_R's avatar
        Tom_R
        New Contributor III

        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