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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

View item unit cost

(0) ShareShare
ReportReport
Posted on by

I want to view the product's unit cost (Item Model Group set to Weighted Average)

where do i view the Item Unit Cost in AX ? 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: View item unit cost

    Hi,

    Please use the following job/code to get the product's unit cost which has item model group as a weighted average. Let me know if anything is missing.

    static void itemModelGroup(Args _args)
    {
        InventTable inventTable;
        EcoResProduct ecoResProduct;
        InventModelGroup   inventModelGroup;
        InventModelGroupItem inventModelGroupItem;
        InventItemPrice      inventItemPrice;
        InventDim            inventDim;
        
        while select * from inventTable
            where inventTable.ItemId == "XYZ"
            join ecoResProduct
            where inventTable.Product == ecoResProduct.RecId
            join ModelGroupId from  inventModelGroupItem
            where inventModelGroupItem.ItemDataAreaId == InventTable.dataAreaId
               && inventModelGroupItem.ItemId == InventTable.ItemId
            join inventModelGroup
            where inventModelGroupItem.ModelGroupDataAreaId == inventModelGroup.dataAreaId
            && inventModelGroupItem.ModelGroupId == inventModelGroup.ModelGroupId
            && inventModelGroup.InventModel == InventModel::AverageCost // Weighted avg
        {
            select firstOnly inventItemPrice
                order by ActivationDate desc
                where inventItemPrice.ItemId == inventTable.ItemId
                && inventItemPrice.PriceType == CostingVersionPriceType::Cost
                join inventDim
                where inventItemPrice.InventDimId == inventDim.inventDimId;
            if (inventItemPrice)
            {
                info(strFmt("Item: %1, ModelGroup: %2, Cost: %3, Price: %4", inventItemPrice.ItemId, inventModelGroupItem.ModelGroupId, inventItemPrice.CostingType, inventItemPrice.Price));
            }
                
        }
    }
  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at
    RE: View item unit cost

    if i understand you ,if you ask about unit cost for every transaction ?!

    you can go to inventory and warehouse management /inquires / transaction form .

    you will find unit cost for every transaction

  • Suggested answer
    Adineh Negahdari Profile Picture
    807 on at
    RE: View item unit cost

    Hi

    you can see the Cost Amount (weighted average of Items) in Inventory Management module.

    Do you want some kind of reports or what?

    Regards

    Adineh

  • Guy Terry Profile Picture
    28,924 Moderator on at
    RE: View item unit cost

    Do you mean the cost (value) of one unit of the inventory of an item (which, with the Weighted average model, is the running average cost of the inventory)?

  • Community Member Profile Picture
    on at
    RE: View item unit cost

    All items cost in inventory + logic behind standard cost.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Willem van Duren Profile Picture

Willem van Duren 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans