Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Budgeting - Trouble using submodels in Budget Entries AX RTM

$
0
0

Hi all,

This is the first time im posting in the community, hope you can help me.

I have a problem working with budget submodels in the budgeting module.

The version i'm working on is Dynamics AX 2012 RTM CU3 and upgrading to R2 or R2 or CU7 is not an option.

In the budget setup section, budget models form, i've defined budget models and budget submodels that are linked to budget models.

Well, in the budget entries form i've noticed that the field budget submodel(BudgetTransactionHeader Table) is hidden, i've looked up the code to find out why. And i found that this field is intentionally hidden and the event "lookup" in the budget model field forces the submodel value with the value of the model:

Table: BudgetTransactionHeader --> Methods --> editBudgetModel --> line 27

...

       this.BudgetModelId = budgetModelId;

        this.BudgetSubModelId = budgetModelId;

        this.BudgetModelDataAreaId = CompanyInfo::findRecId(Ledger::find(this.PrimaryLedger).PrimaryForLegalEntity).DataArea;

...

so, i turned the submodel field visible in the form, added a lookup form for submodels and commented the line in bold. Now, i have submodels visible and selectable in the form. Then I loaded budget entries and then i executed the option "updatebudgetbutton" in order to post the entries. However, an error occurs, i dug into the code that originates the error:

Class: BudgetTransactionManager --> validateBudgetModel --> line 38

...

        if (budgetModel.Type == HeadingSub::SubModel)
        {
            isValid = AifFault::checkFailedLogFault(
                strfmt("@SYS23399", _budgetTransactionHeader.BudgetSubModelId, _budgetTransactionHeader.BudgetModelId),
                #BudgetModelTypeIsSubModel);
        }

...

Method: AifFault::checkFailedLogFault()

client server public static boolean checkFailedLogFault(str _reason, str _code = '', URL _helpURL = '', container _reasonParameters = conNull())

 {

    AifFault::logWarning(_reason, _code, _helpURL, _reasonParameters);

    return false;

}

??????????????????????, that's the part i'm confused, the code indicates that everytime i would use a submodel and update the balance it won't be valid. So, i don't understand why AX lets you create submodels if later it won't let you post the entry.

Why question is: Is there a way to solve this using the AX framework, enabling licences,module setup, etc., or do i have create a workaround modifying the native code?

I haven't had the opportunity to review the code in R2 or R3, is this problem solved on the upgrades?

Please, I would appreciate an answer on this in order to take action about the validation.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>