Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

Cost price on Sales lines (SQL table structure question)

Posted on by 5

Hello,

Im trying to make an SQL query on the sales line table for BI reporting. I have run into some problems with the fact that the unit cost doesn't get updated automaticly.

We sell a lot where we don't have the item in the warehouse yet, so a lot of sales lines and invoiced sales lines doesn't have a cost price.

Is there a workaround? Can i get a correct cost price from somewhere else? Can I get it from the Value Entry table or maybe Item Ledger Entry. Average price is fine - it doesn't have to be FIFO.

We are on a NAV2017 if that matters.

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Cost price on Sales lines (SQL table structure question)

    Yes you can get that from using Value Entry and Item Ledger Entry, once you find the Item Ledger Entry, filter the Value Entry table for that Item Ledger Entry No.  then sum cost amount expected and cost amount Actual then divide by Item Ledger Entry Quantity * Qty. Per Unit of Measure

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