web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Company abcd is already associated with a legal entity. Select a different company.

(0) ShareShare
ReportReport
Posted on by

When I click on Main account and select a specific account, I am receiving the error warning:  Company XXXX is already associated with a legal entity.  Select a different company..

We restored the AX db from 1 server to another and followed the restorations steps / scripts. I am able to see all the data in the new environment however get this type of error. Appreciate any help on what step am i missing or overlooked.

*This post is locked for comments

I have the same question (0)
  • OyvindBerg Profile Picture
    25 on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hi!

    The reason for this error message could be that you had records in table MainAccountLegalEntity with not existing values in the field LegalEntity. This might occur when a company is deleted and the company specific records for the main accounts remains in this table.

  • manikumar Profile Picture
    1,623 on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    this is not a solutions for the problem, if you think doing all steps again will solve your problem means you shouldn't have posted before.

  • Atef abdel monem Profile Picture
    15 on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hi Anton 

    how did you know the correct value ?

  • Community Member Profile Picture
    on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Please Run full compilation and then Database synchronization. Hopefully this issue will be resolved.

  • Suggested answer
    Anton Ivanov Profile Picture
    on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hi,

    We have the same issue and the problem was in the table “MainAccountLegalEntity” where the field “LegalEntiry” was with incorrect values (probably copied from another installation).

    We just replaces values in the table with correct value and everything was OK.

    BR,

    Anton Ivanov

  • André Arnaud de Calavon Profile Picture
    298,286 Super User 2025 Season 2 on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hi Prem,

    If the second attempt worked for you, you solved your own problem. If you can find the cause, it would be nice to know what happened. You can mark your own answer to have the question getting the status answered.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    I did some additional troubleshooting and I went back to doing the steps all over again. Restored the AX dbs and ran the scripts and this time around it seems to be working fine and not throwing any errors. Not sure if its something I did incorrectly or missed a step. Will go over everything again to be sure.

    Thanks for the quick response Hans-Peter / Andre

  • Community Member Profile Picture
    on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hello Prem

    I found that this message is given by the "validateWrite" method on the "CompanyInfo" table but I have no idea why this is thrown while selecting a record in the "MainAccount" table. By the way, is the error thrown when setting the focus on a line in the MainAccountListPage or when opening the record for editing?

    Anyway this sounds like an inconsistency in your data. Are'nt there any doubles in the copied tables? Like André asked, I am wondering if you copied both databases; data and model store.

    Maybe a simple first step could be to perform a Consistency check in " System administration - Periodic - Database - consistency check.

    Kind regards

    Hans-Peter

  • André Arnaud de Calavon Profile Picture
    298,286 Super User 2025 Season 2 on at
    RE: Company abcd is already associated with a legal entity. Select a different company.

    Hi Prem,

    Can you provide some more information? Is it still working correctly in the original environment? Did you restore both the AX business database and model database? What restoration steps did you do?

    I have seen a similar error before. Are there any roles assigned to this user? Do you have this error with the system administrator role assigned?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Mea_ Profile Picture

Mea_ 2

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans