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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to union 2 tables in business central sales header and sales header Archive

(0) ShareShare
ReportReport
Posted on by 5

my client wants to see all data from sales header and sales header archive on report it can be done by union any one can assist me in this 

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at

    Hi

    you should have a customisation developed

    e.g. a page linking the sales header to the sales header archive, but beware that the archive may contain several versions of the same document.

    so I would make a page with the sales header

    and as a subpage the sales header archive with the various versions.

    the ratio between the two tables is 1- > n

    you could also develop a report

    DAniele

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    The link between the sales header and the Sales Header Archive is the "Document Type" field and the "No." field.

    So

    SalsHeaderArchive.setrange("Document type", SalesHeader."Document type");

    SalsHeaderArchive.setrange("No.", SalesHeader."No.");

    Should give you all archived headers for a specific sales header.

  • JJMc Profile Picture
    293 on at

    How about creating a Query with the 2 or even 4 tables, and adding it to the view of one of the lists?

    That works fine for me.

  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at

    hi

    yes I agree, but as I said before you always need customisation

    DAniele

  • Suggested answer
    Steven Renders Profile Picture
    5,698 Moderator on at

    A possible solution, out of the box, is to export the data from both tables to Excel, using the send to Excel button, and then in Excel do a union.

    Otherwise, you need to develop a report, with 2 data items, one for each table.

    Another solution is to expose both list pages as webservices, and then import the web services in Excel or Power BI.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 607 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 421 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 375 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans