Notifications
Announcements
No record found.
Hi,
I'm trying to get the production bom item cost price per unit through code.
Does anyone have an idea how to do that?
Regards,
Brightlin
Hi Brightlin,
Can you elaborate on the business process where you need this? What exact cost do you want to retrieve? Estimated, WIP, or cost calculated?
Sure André.
When you go to Production control -> Common -> Production orders -> All production orders -> open a production -> Production order tab -> under Production details group -> BOM -> select a bom item -> click on the Inventory drop down -> Transaction -> and there you have the cost amount field, which a calculated method.
For the invoiced production orders parent item, I want to get it's bom item cost amount.
How to get the bom item cost amount?
Am I clear?
If I understand you correctly, you need the cost price from the related inventory transaction. If I'm not mistaken, the calculated method is available on the table. You can try to find the correct InventTrans in coding and then call the display method to get this amount.
I'm not sure if you need all cost from all BOM lines or one single item line.
I tried using the calculated methods by since the bom items have been invoiced, I don't get the correct cost price from those methods comparing to their respective inventory transactions.
Can you share the code you used with your approach? That might help understanding where to assist you.
I was using the calculated methods that comes with AX. When I was comparing it to the inventory transaction cost price, at times is was the same other time not.
Can you provide some examples? Note that the inventory closing or recalculation can indeed create an adjustment on the inventory transaction which is not reflected on the production order.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 584 Most Valuable Professional
André Arnaud de Cal... 499 Super User 2025 Season 2
Sohaib Cheema 254 User Group Leader