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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Cost price on Sales lines (SQL table structure question)

(0) ShareShare
ReportReport
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.

I have the same question (0)
  • Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans