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

Announcements

News and Announcements icon
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

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Subra Profile Picture

Subra 500

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 462 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans