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

Notifications

Announcements

Community site session details

Community site session details

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

Update Financial and Physical Cost From X++ Code

(0) ShareShare
ReportReport
Posted on by 167

Hi ,All 

  I want to override the standard Financial and Physical Cost  when  (Ship Transfer Orders , Packing slip for Sales Orders , Post Movement journal   ) with new cost 
    

    which classes that responsible for this  On AX 2012 R3 ?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,352 Super User 2025 Season 2 on at

    Hi Ashraf,

    Can you tell in detail what should happen? What is the business scenario here? The costing framework is the core of the inventory valuation. I wouldn't just ask to change the behavior as you can easily break the inventory valuation options and create data corruption.

  • Ashraf Kamal Profile Picture
    167 on at

    Hi , Andre

    the business issue is .. there are some items need  increase their  cost during transfer orders  , sales orders or movement journal , So i create an custom  form for this items with cost , After that i need  override the standard financial and physical cost with the new  .

    this is all the story  ...  

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Ashraf,

    You mean during transfers/movements the items get either more or less 'valuable', which requires you to adjust the standard costs.

    Is that right?

    If my understanding is correct why have items setup with a standard cost pricing model?

    With FIFO, LIFO ... valuated items you could add item charges and avoid that problem.

    Before manipulating cost prices, I would suggest that you have a discussion with your warehouse managers/users why you use standard costs if you constantly need to adjust them.

    Best regards,

    Ludwig

  • André Arnaud de Calavon Profile Picture
    301,352 Super User 2025 Season 2 on at

    Hi Ashraf,

    What inventory costing model are you using? What makes a cost to change on a sales order? I still don't understand the business processes here. What exactly is causing an increase of the cost? Is it a revaluation because of market value (e.g. fluctuating iron price), is it additional costs, like transport, etc?  

  • Ashraf Kamal Profile Picture
    167 on at

    i know that is Not good  to override Cost , But They need That

    Are you know the classes name ?

  • Ashraf Kamal Profile Picture
    167 on at

    Hi , Andre

    i know that is Not good  to override Cost , But They need That

    Are you know the classes name ? or can you help me to find  ?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ashraf,

    You could start with InventUpdate classes (InventUpd_Physical, InventUpd_Financial). But be really careful, as was mentioned before there is a risk to corrupt data with incorrect modification and you can even don't notice it in a short term perspective.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,352 Super User 2025 Season 2 on at

    Hi Ashraf,

    In my opinion, the cost of an item can't change on a sales order. On a return sales order, you can specify your own cost price. I wonder why you accept to do a customization for a customer if you can't explain the business process which causes the change. Inventory deductions can't get another cost price; that is really determined by the inventory costing logic. If you change that, then for sure, you will encounter issues. That is why I asked the question above. I would like to protect you, but also the customer from getting into serious issues.

    If it is about changing the cost on inventory deductions, I would really encourage you to refuse to do it and let the customer read the replies on this forum.

    I can imagine that transport costs should be added in case of transport orders. Then it would be possible to interact with it, but not for the shipping part, but the transfer receipt.

  • Suggested answer
    Ashraf Kamal Profile Picture
    167 on at

    Hi , All 

    I solved my problem  , Thanks for All 


    For  Transfer order 

         The Class Name is  :  InventUpd_Financial   --------    Method Name  :  updateFinancialIssue

    For  Movement journal 

         i write some code in Click Method Of Post Button To update the cost According to My Criteria .

    Hope this be Useful for others 

  • André Arnaud de Calavon Profile Picture
    301,352 Super User 2025 Season 2 on at

    Hi Ashraf,

    As you modified the method updateFinancialIssue, it means that you are trying to influence the cost on deductions. Like mentioned above, you can create serious data issues related to the cost price when you do so. Depending on the inventory costing model, the system will try to recalculate the cost on inventory closing or recalculation. For standard cost and moving average, there is a huge impact which can't be corrected. I'm repeating the warning above. I rest my case here...

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 678 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 407 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans