Error while posting Prepayment for GL Entries then Posted Sales Invoice Inserted only.

Hi Everybody,

I have created functionality for Prepayment Invoice posting, When I post this invoice then I get error in while inserting GL entries but previously my sales invoice hdr & Sales invoice Line inserted so after getting error my GL entries, customer ledger entries not Inserting, So after getting error I want to not insert Sales Inv Hdr & Sales Inv Line data.

Please help…

How to rollback for this transaction.

What error do you get? And which version is this? Before the standard prepayment functionality?

Have you created new functionality which inserts lines directly into the G/L Entries? Without using codeunit 12??

Actually I am posting Prepayment through batch, I get Rounding error in CU 12, but after getting error transaction not rolling back(Data inserts in Sales inv hdr & Sales Inv Line).

for inserting G/L Entries I am using CU 12

If it is not rolling back, then the explanation is very often a programming error involving a COMMIT.

But after inserting Sales Invoice Hdr & line Commit function not executing in debugger.

If the transactions stay in your database after exiting then your commit function works fine. Never use COMMIT, until at the end of your transaction! NEVER.

okay… Thanks for help. Actually After getting error my code executes else part also, I think that was problem.