Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How To get inventory cost as of date

(0) ShareShare
ReportReport
Posted on by 5

Hi all i use Dynamics AX 2012 R3 and right now i get some issue because i can get the item cost backdated. 

i try to get from inventory value report summary but in this report i just can get the cost for the item that still have stock on system, but if there is some item that already don't have the stock but in that month we have transaction for that item, i can't get the item cost. can any one help me to get this with X++ code or there is some class i can used?

i try to used this job before but still can't

static void SL_FindItemCostPriceAsPerDate(Args _args)

{

   InventDim           inventDimCriteria;

   ItemId                 itemId;

   InventDimParm  inventDimParm;

   date                    perDate = mkDate(28,3,2016);

   InventOnHand    inventOnHand;

   ;

   itemId                 = '010100002';

   inventDimCriteria.inventBatchId = '123456';

   inventDimParm.initFromInventDim(inventDimCriteria);

   inventOnHand    = InventOnhand::newParameters(itemId, inventDimCriteria, inventDimParm);

   info(strfmt('%1', inventOnHand.costPricePcs(false, perDate)));

}

i try to used this but there is always 0

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: How To get inventory cost as of date

    Hi,

    The inventory value report has multiple configuration options available.

    If you are for example interested in the costs of the items that have been sold then enable to COGS parameter or if you want to have some information on adjustment postings then select the profit and loss parameter.

    Doing that allows you the costs of items that might not even be on stock as of today but for which you had costs over the last month/week/etc.

    Best regards,

    Ludwig

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans