Reversing finished production orders

mdraskovicmdraskovic Member Posts: 24
Is there any way to change status of production order
from finished to released ?


  • Options
    s.delikostovs.delikostov Member Posts: 32
    Try this:

    In table 5405 Production Order remove code:
    //IF Status = Status::Released THEN
    //  IF ProdOrder.GET(Status::Finished,"No.") THEN
    //    ERROR(Text007,Status,TABLENAME,ProdOrder."No.",ProdOrder.Status);

    In form 99000867 Finished Production Order add new item Change Status in button Prod. Order with properties:
    Action = RunObject
    RunObject = Codeunit Prod. Order Status Management

    In form 99000882 Change Status on Prod. Order in function Set change code to:
    IF ProdOrder.Status > ProdOrder.Status::Simulated THEN
      NewStatus := ProdOrder.Status + 1
    ELSE IF ProdOrder.Status = ProdOrder.Status::Finished THEN
      NewStatus := NewStatus::Released
      NewStatus := NewStatus::"Firm Planned";
    Stamen Delikostov
    Navision Solution Developer
    Intelligent Systems Bulgaria
  • Options
    mdraskovicmdraskovic Member Posts: 24
    Thank you very much for this advice.

    Although, I have some considerations:
    is there no "catch" to consider, if you change status from finished back to released ?
    Isn't there some posting done, when you originally change status from
    released to finished ?

    I've looked a bit...the core is probably in the CU5407 Prod. Order Status Management, trigger ChangeStatusOnProdOrder.
  • Options
    HalMdyHalMdy Member Posts: 429
    Question is : do you want simply change the status to have the opportunity to post extra costs (raw mat, capacities ...) or do you want to make a complete reversing of the PO with cancelling all the already posted costs ?

    If it is a simple change of the status, work as s.delikostov explains (you have certainly to comment code in all related tables to Prod. Order like Lines, Routing Lines ...).

    If you want to make a complete "rollback" of the prod. order : hard job to do, you need to make a function that makes all the opposite entries (Warning if the costs are adjusted also ...)
  • Options
    mdraskovicmdraskovic Member Posts: 24
    For now it is just opening finished Prod.order to post additional
    entries (consumption).

    Could this be problem ?
Sign In or Register to comment.