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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Get a list of companies for an AOSInstance using X++\ AIF\ BC.net

(0) ShareShare
ReportReport
Posted on by 695

Hi

I was thinking of using a SQL distinct call on the CompanyInfo table using BC.Net - but is there a better approach to get the list of companies within an instance?

How is a company noted as archived for example in the DB tables?

*This post is locked for comments

I have the same question (0)
  • Dick Wenning Profile Picture
    8,705 Moderator on at

    use table DataArea, it is a kernel table, low level includes virtual companies.

    but what is the scenario you are in, who is requesting this informantion?

  • Suggested answer
    Tommy Skaue Profile Picture
    Moderator on at

    There is no "Archive"-bit on Companies. You can either query DataArea or CompanyInfo, depending on what you want to use the information to. As Dick says, Virtual Companies will be listed in DataArea.

    You will also find the Company DAT, which is not in use (but must not be deleted/removed or used as a normal Company).

  • LeeRoberts Profile Picture
    695 on at

    Hi

    Basically I am integrating AX data with an in-house product - I have to list the available companies for the user in a dropdown - so as not to make any mistakes when entering the company name.

    I would NOT want to display any virtual companies!

  • Verified answer
    Tommy Skaue Profile Picture
    Moderator on at

    Then use CompanyInfo-table. If you really need to differentiate "active" and "non-active" companies for your application, you are better off creating your own custom table and add Company Foreign Keys into that table.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans