FORM.RUNMODAL under 360 FinSQL.exe performs unwanted commits

TorbenTorben Member Posts: 21
edited 2005-08-22 in Navision Attain
Hi all ...(except MS that wants a pile of money to be informed of their own errors! :x )

I have discovered a problem with unwanted commits in Navision Attain 3.60 finsql.exe (build 11353).

This is most likely an error in the runtime module. At least thats what I think... 8-[

The problem arises when returning from a FORM.RunModal. An ERROR issued shortly after, does NOT roll-back the database! :shock:

I have isolated the functionality that goes wrong to the following litte scenario:
(1) a table X with 2 fields: KEY and DUMMY (Both code 20)
(2) a form on table X...
(3) On table X:
The following code on the OnLookup Trigger for the DUMMY field:
IF FORM.RUNMODAL(31,Item) = ACTION::LookupOK THEN BEGIN
DUMMY := Item."No.";
ERROR('Test!');
END;

How to use:
On the form use F6 in the DUMMY field to choose an item and select OK. The error is fired (as expected) So far so good :-k

PROBLEM:
I now expect the DUMMY field to not contain information from the Item record, because of the ERROR!
But it seems that the DUMMY information is committed anyway!

Interestingly enough the functionality works as expected when NOT using the form, but running table X directly... :?:

Using the client monitor it seems that a 2 commits are fired!!!

Okay, I have made a workaround but comments are welcome.

Best rgds
Sign In or Register to comment.