rollback an transaction


I couldn’t find out how perform an transaction and roll it back. The scenario is as follows:

It should be possible to print an Advance Invoice as a testpaper from the sales order form.
To do this, my idea was to post the order without commit (somehow temporary), then print with the normal invoice report and roll back the transaction, because it should be only a test.

My question is, if it is possible, how in looks in code?

Thanks for all help!

PS: I use NAV 2009

Why you would like to post the transaction and roll back ?

Best way design new report as Test Invoice Report and attached to sales order and take a print out of that report

Basically, this is very wrong approach you are planning to temporarily post and recall. instead you can design test report (or a new report called something Proforma Invoice) which will look like the Invoice.

Thanks for your replies.

I only wanted to recycle existing things. But I see I thought of it in an unusual way.

Now I will try to adopt the existing report for my case and include it into the required form.