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 :
Finance | Project Operations, Human Resources, ...
Answered

Extract Accounts Payable Invoice line items using SQL script

(0) ShareShare
ReportReport
Posted on by 5

Hi, I need to extract Accounts Payable data (invoice lines) with Invoice Types and line numbers using a SQL script, however am not finding any diagram that can help. My source is D365 F&O. Can someone please guide or assist with the query?

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    297,395 Super User 2025 Season 2 on at
    RE: Extract Accounts Payable Invoice line items using SQL script

    Hi Godfrey,

    The vendor invoices are stored in the tables VendInvoiceJour and item line details in the table VendInvoiceTrans. For cost invoices, you can find line details in the vouchers. (GeneralJournalAccountEntry and GeneralHournalEntry tables).

  • Godfree_d Profile Picture
    5 on at
    RE: Extract Accounts Payable Invoice line items using SQL script

    Hi André

    Thank you for the reply.

    The environment is on-premise. So, i need to get an extract of all the invoices (header and Lines) for audit purposes. I do know that there is a report however i would like to use SQL to extract either the individual tables or already join them and extract them.

    Regards

    Godfrey

  • André Arnaud de Calavon Profile Picture
    297,395 Super User 2025 Season 2 on at
    RE: Extract Accounts Payable Invoice line items using SQL script

    Hi Godfree,

    Can you tell what exact business requirement you try to fulfill? Do you need to export data for reporting purposes? Is this environment running in the cloud or on-premise? On customer cloud environments, you don't have direct SQL access.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 785 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 626 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 621 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans