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)

How do I select multiple companies in RunBase Query

(0) ShareShare
ReportReport
Posted on by 780

I've to extract data from multiple companies in AX3/AX2009. The list of companies may change from run to run. So, I want to present the user with a select query on CompanyInfo table and select the dataAreaIds for which data needs to be extracted.

 

When I select a company in RunBase query, I get the message "The Company field cannot be selected."

 

Is there a way to select companies in RunBase query?

 

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Re: How do I select multiple companies in RunBase Query

    You can set query's AllowCrossCompany property to Yes and choose companies on the "Company Range" tab in SysQueryForm (or by Query.addCompanyRange()). This functionality is in AX2009 only.

  • Suggested answer
    Community Member Profile Picture
    on at
    Re: How do I select multiple companies in RunBase Query

    You can write a query in this way:

    select crosscompany table1

    where table1.dataareaid == <selectedcompany>

    Hope it'll be helpful.

  • RT10 Profile Picture
    780 on at
    Re: How do I select multiple companies in RunBase Query

    Martin,

    Thanks for the response. That allowed me to select companies using the "Company Range" tab. However, the selected companies don't show in the gray, uneditable box. Is there a way to show selected companies?

    Thanks.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans