Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

Posted on by 440

Hi,

We are using AX 2012 R3 CU9, I am getting the below error message while recalculating the inventory. I tried to debug the code and i found a map called "budgetCheckResult" into class 'Class\ProjBudgetTransactionManager\ setBudgetCheckResultMap' declaration but unfortunately it is not listed into map list into AOT.

How can I find the map into AOT to trace it as the error is related to the map initialization?

Did anyone face the same error while recalculating the inventory??

Map object not initialized.

Stack trace

(S)\Classes\ProjBudgetTransactionManager\setBudgetCheckResultMap - line 14
(S)\Classes\ProjBudgetTransactionManager\negativeTransValidatedAmounts - line 89
(S)\Classes\ProjBudgetTransactionManager\increaseBudget - line 66
(S)\Classes\ProjBudgetTransactionManager\inventAdjustIncreaseBudget - line 32
(S)\Classes\ProjPost\inventAdjustPostBudgetUpdate - line 52
(S)\Classes\ProjPost\inventAdjustPost - line 120
(S)\Classes\InventAdjustPost\updateNow - line 65
(S)\Classes\InventCostHelp\updateLedgerPosting - line 93
(S)\Classes\InventCostLedgerPostingTask\doRun - line 12
(S)\Classes\InventCostHelpTaskBase\run - line 37
(S)\Classes\InventCostTaskControllerSingleThread\run - line 19
(S)\Classes\InventCostClosing\run - line 88
(S)\Classes\InventCostClosingRecalc\main - line 43
(S)\Classes\xMenuFunction\runServer
(C)\Classes\FormFunctionButtonControl\Clicked

Recalculation is being paused because of an error.

*This post is locked for comments

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,269 Super User 2024 Season 2 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Hi Peter,

    To be honest, I don't have any clue. I'm not able to reproduce this issue, so also can't debug it like you did. Did you already check LCS issue search for known issues?

  • Peter Samir Profile Picture
    Peter Samir 440 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Hi,

    As i mentioned before, This object is being used into ''Class\ProjBudgetTransactionManager\ setBudgetCheckResultMap''.

    It is a Sys method and i tried to add the highlighted line as shown below and the error is not shown anymore while runing the inventory recalculation.

    So, I would like to know is it the correct way where if yes i will apply to the live server??

    private void setBudgetCheckResultMap(ProjId _projId,

                                           ProjCategoryId _projCategoryId,

                                           AmountMST _overBudgetCostAmount,

                                           AmountMST _overBudgetSalesAmount,

                                           ProjBudgetCheckResult _projBudgetCheckResult,

                                           ProjBudgetControlErrorWarning _projBudgetControlErrorWarning,

                                           str _message,

                                           str _revenueMessage,

                                           ProjActivityNumber _projActivityNumber,

                                           RefRecId _sourceDocumentLine =0

                                           )

    {

       str key = (_sourceDocumentLine)?  strFmt('%1#%2%3',_projId, _projCategoryId, _sourceDocumentLine) :  strFmt('%1#%2',_projId, _projCategoryId);

       budgetCheckResult = new Map(Types::String, Types::Record);

       budgetCheckResult.insert(key, [_projId, _projCategoryId, _overBudgetCostAmount, _overBudgetSalesAmount, _projBudgetCheckResult, _projBudgetControlErrorWarning, _message, _projActivityNumber, _sourceDocumentLine, _revenueMessage]);

    }  

  • Suggested answer
    Zain Mehmood Profile Picture
    Zain Mehmood 2,715 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Hi Peter,

    Have you tried resuming the calculations? What if you try to close the inventory? Did you get the same error. Try closing the inventory & retry the recalculations.

    Maybe it will initialize this time.

    Regards,

    Zain

  • Suggested answer
    Khushhal Garg Profile Picture
    Khushhal Garg 1,514 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Find references for this map used and see where is it getting initialized. Put breakpoint and debug it and check call stack where it is getting initialized. Looks like map is not getting initialized with the object passed

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,269 Super User 2024 Season 2 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Hi Peter,

    Before just trying to fix something in the AOT, have you searched on LCS issue search for possible known issues and available fixes?

    If there is no fix, you need to see where this map is being used and possibly see where the initializing of the variable is missing or skipped due to a (wrong) condition.

  • Suggested answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Error while recalculating the inventory closing - (Map object not initialized) 'budgetCheckResult' Map

    Hi Peter!

    The budgetCheckResult is not listed in the AOT - it's variable, not the AOT object.

    Screenshot-2019_2D00_09_2D00_29-at-14.52.35.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans