Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Query data when create PO direct delivery from Sales order in AX 2012

Posted on by 237

Dear Experts,

I want to create SQL query to get data sales order(SO, packing slip, invoice), purchase order(PO, product receipt, invoice) when I create PO direct delivery from sales order.

Get information:

SalesId, ItemId, Sales Qty, Sales Amount, PurchId, ItemId, Purch Qty, Purch Amount, Packing slip number, Product receipt number, Delivery date, Cust Invoice Id, Cust Invoice Qty, Cust Invoice Amount, Vendor Invoice Id, Vendor Invoice Qty, Vendor Invoice Amount.

Could you please advice me?

Thanks in advance.

*This post is locked for comments

  • Verified answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Query data when create PO direct delivery from Sales order in AX 2012

    Hi Sacramento!

    To achieve this you need to use SalesTable, SalesLine, PurchTable, PurchLine, CustPackingSlipJour, VendPackingSlipJour,  CustInvoiceJour, CustInvoiceTrans, VendInvoiceJour, VendInvoiceTrans tables.

    When you create PO from SO, the SO and PO are linked by lines (InventRefId and InventRefTransId fields).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans