Find A Sales Line Price

Jonathan2708Jonathan2708 Member Posts: 552
Hi,

I'm writing a report to compare invoiced prices against agreed customer sales prices. I want to write code to lookup what the price of an item was for a customer on a particular date. Rather than re-invent the wheel I'm trying to use the FindSalesLinePrice function of CodeUnit 7000 (Sales Price Mgt). But it looks like this only works for a live saved sales document. Rather than creating/deleting documents, is there a better way to achieve what I want?

Any help appreciated,

Jonathan

Comments

  • DaveTDaveT Member Posts: 1,039
    Hi Jonathan,

    You have two options without modifing the codeunit

    1. create temporary record variables for the sales header and sales line and post a dummy order to the temporary tables to find the price

    2. Call the individual sub-functions of the codeunit e.g.
    FindSalesPrice
    CalcBestUnitPrice

    Hope this helps
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.