Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Modify Ledger Main Account

(0) ShareShare
ReportReport
Posted on by 486

Hi,

I don't understand where the error is coming from. I did edit/modify a certain chart of account, after saving, it gives me an error cosLedgerTable.renamePrimaryKey() but when I check the code, there were no enhancements nor modifications being implemented.  Based on the stack trace, it refers to wrong type of array index, but again, there were no code modifications on the said method. Below is the error that happen to prompt. Thank you in advance.

30640887.Capture.PNG

*This post is locked for comments

  • Verified answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Modify Ledger Main Account

    Hi,

    This seems to be the issue.

    Are you actively using the cost accounting module?

    If you don't then delete the cost categories and renaming should work as usual in the COA.

    If you activated use the module, then try changing the cost category name and then the account name. Changing the cost category name won't automatically change the account name.

    Best regards

    Ludwig

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Modify Ledger Main Account

    Hi Ludwig,

    There is, the said module is active and can see the cost categories in both environment (test, live).  I tried to modify the cost category name on the grid but it did not reflect on the chart of accounts.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Modify Ledger Main Account

    Hi,

    I just noticed the cosLedgerTable reference that you mentioned.

    Do you have the cost accounting module active in your live system?

    Can you see cost categories in live? What about in the test system?

    Best regards,

    Ludwig

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Modify Ledger Main Account

    Hi Ludwig,

    I'm using AX 2012 Feature Pack and resolving the issue within the test environment.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Modify Ledger Main Account

    Hello Gepoy,

    This sounds strange because you should be able to modify the account name any time even from the AX client without using any code.

    Do you see the same issue if you replicate your steps in a different demo or test system?

    What AX2012 version do you use? (RTM, R2, R3)

    Best regards,

    Ludwig

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Modify Ledger Main Account

    I did modify the account name (and only the account name), and it give me that error when I click on the Save button. I think 'xRecord' refers to the current record I'm trying to modify.

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Modify Ledger Main Account

    Hi,

    What is the class 'xRecord' mentioned in the error message?

    What have you modified in the chart of account exactly?

    Would be great if you could elaborate.

    Many thanks and best regards,

    Ludwig

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans