FORM.RUNMODAL under 360 FinSQL.exe performs unwanted commits

Torben
Member Posts: 21
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
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
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions