It is not a test you can put in production, but during development testing, it can be useful.
Put this code in the place where you want to test if you are in a transaction or not:
IF CONFIRM(’Test if a transaction is active?’,FALSE) THEN
PAGE.RUNMODAL(PAGE::"Company Information");
If you are in a transaction, this will generate an error, otherwise the page will be shown (it also works with forms.)
Читать дальше