Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Select statement crosscompany

(0) ShareShare
ReportReport
Posted on by 619

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 619 on at
    RE: Select statement crosscompany

    Nope removed the job already because tried it in different ways

  • GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: Select statement crosscompany

    Can you share the code you have tried?

    Thanks,

    Girish S.

  • CRSW Profile Picture
    CRSW 619 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,821 Moderator 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,554 Moderator 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 231,409 Most Valuable Professional on at
    RE: Select statement crosscompany

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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans