Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Update Financial and Physical Cost From X++ Code

Posted on by 165

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 ?

  • Ashraf Kamal Profile Picture
    Ashraf Kamal 165 on at
    RE: Update Financial and Physical Cost From X++ Code

    Good Morning , @André Arnaud de Calavon

    Realy, I understand you  and my manager understand this issue  But this request is nedded for company so we forced

       to do it and explain the Impact of it  .

    Note : We customized many forms in AX 2012 R3 to be  compatible for our business  .

    Thanks Andre for your reply .

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: Update Financial and Physical Cost From X++ Code

    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...

  • Suggested answer
    Ashraf Kamal Profile Picture
    Ashraf Kamal 165 on at
    RE: Update Financial and Physical Cost From X++ Code

    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 

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: Update Financial and Physical Cost From X++ Code

    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.

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Update Financial and Physical Cost From X++ Code

    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.

  • Ashraf Kamal Profile Picture
    Ashraf Kamal 165 on at
    RE: Update Financial and Physical Cost From X++ Code

    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  ?

  • Ashraf Kamal Profile Picture
    Ashraf Kamal 165 on at
    RE: Update Financial and Physical Cost From X++ Code

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

    Are you know the classes name ?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: Update Financial and Physical Cost From X++ Code

    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?  

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Update Financial and Physical Cost From X++ Code

    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

  • Ashraf Kamal Profile Picture
    Ashraf Kamal 165 on at
    RE: Update Financial and Physical Cost From X++ Code

    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  ...  

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans