Roll Back Posting Routines

julkifli33julkifli33 Member Posts: 1,073
Hi all,
I have created qty assemble to order in Service Order
I follow all the steps and codes from sales order
but the thing is if there is an error, then it will posted half way (there are records in Service Ledger Entry & Item Ledger Entry, but no service shipment and invoice)
Scenario :
Line 1 (no qty assemble to order)
Line 2 (with qty assemble to order)
Line 3 (no qty assemble to order) -> for example here is the error

then Line 1 and 2, already posted to service ledger
I want to follow like sales order.
if there is an error in any line, then it will not create any lines in service ledger
any clue what i miss?
Thanks

Comments

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    It is not you, it is a COMMIT somewhere in the posting code. If you have development licens you can edit poosting codeunits and comment it out - it is a safe thing to do in almost all cases.

    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • julkifli33julkifli33 Member Posts: 1,073
    I think it's about InitPostATO function
    without this InitPostATO, there is error message
    but there is no Service Ledger created
    but if with InitPostATO, it will generate Service Ledger

    summarize :
    1. With InitPostATO, if no error then good. but if has error record then it will create record halfway.
    2. Without InitPostATO, if error then it will rollback the whole thing, but there is another error code in item jnl post , said document cannot be blank
  • julkifli33julkifli33 Member Posts: 1,073
    solved.
    change the code sequence
Sign In or Register to comment.