Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Select statement crosscompany

Posted on by 557

Hi I am looking for a select statement that gives me back ALL items (inventTable) existing in Company A but not in B

  • CRSW Profile Picture
    CRSW 557 on at
    RE: Select statement crosscompany

    Nope removed the job already because tried it in different ways

  • GirishS Profile Picture
    GirishS 27,803 Super User on at
    RE: Select statement crosscompany

    Can you share the code you have tried?

    Thanks,

    Girish S.

  • CRSW Profile Picture
    CRSW 557 on at
    RE: Select statement crosscompany

    Thx, I tried it but no clue how to make it. It always shows me ALL items not the not existing ones

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,803 Super User on at
    RE: Select statement crosscompany

    Hi,

    You can use container to save the list of company you want to data from and then pass that container to select statement.

    CustTable custTable;
    container conCompanies = ['CompanyA','CompanyB'];
    ;
    select crossCompany :conCompanies
        * from custTable;

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,540 Super User on at
    RE: Select statement crosscompany

    Hi, In addition to Martin's suggestion, you can check this article on how to implement it

    learn.microsoft.com/.../cross-company-x-code-basics

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 225,526 Super User on at
    RE: Select statement crosscompany

    Use a cross-company with two InventTable buffers joined with not-exists join.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans