Page.RUNMODAL = Action::OK in 2013 R2

majormarcell1988
Member Posts: 20
Hi there,
I have a following problem:
CustLedgEntry.SETRANGE("Customer No.","Bill-to Customer No.");
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
CustLedgEntryPage.SETTABLEVIEW(CustLedgEntry);
CustLedgEntryPage.SETRECORD(CustLedgEntry);
IF (CustLedgEntryPage.RUNMODAL = ACTION::OK) THEN
BEGIN
...
END;
When the page runs and i click the OK button everything works as i want, but when i just simply close the page the CustLedgEntryPage.RUNMODAL = ACTION::OK returns true as well and the code will run again.
Is there any way to separate them ?
Thanks in advance.
I have a following problem:
CustLedgEntry.SETRANGE("Customer No.","Bill-to Customer No.");
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
CustLedgEntryPage.SETTABLEVIEW(CustLedgEntry);
CustLedgEntryPage.SETRECORD(CustLedgEntry);
IF (CustLedgEntryPage.RUNMODAL = ACTION::OK) THEN
BEGIN
...
END;
When the page runs and i click the OK button everything works as i want, but when i just simply close the page the CustLedgEntryPage.RUNMODAL = ACTION::OK returns true as well and the code will run again.
Is there any way to separate them ?
Thanks in advance.
0
Comments
-
majormarcell1988 wrote:Hi there,
I have a following problem:
CustLedgEntry.SETRANGE("Customer No.","Bill-to Customer No.");
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
CustLedgEntryPage.SETTABLEVIEW(CustLedgEntry);
CustLedgEntryPage.SETRECORD(CustLedgEntry);
IF (CustLedgEntryPage.RUNMODAL = ACTION::OK) THEN
BEGIN
...
END;
When the page runs and i click the OK button everything works as i want, but when i just simply close the page the CustLedgEntryPage.RUNMODAL = ACTION::OK returns true as well and the code will run again.
Is there any way to separate them ?
Thanks in advance.
Confirmed, it's a bug.
Tested on build 35796.
MatteoReno Sistemi Navision Developer0 -
Thanks for you info, i tested it on Build 35664 and 35473.0
-
Dont know the use for ACTION::OK but thru-out the code ACTION::LookupOK is always used.
Edit: I did an export of the full source and noticed some spots that seem to be using ACTION::OK..., so yes it seems broken also with 35800.0 -
In Microsoft Dynamics NAV help you can read in RUNMODAL command help:
Page.RUNMODAL Return Values:
OK Chooses the OK button.
Chooses the X button when there was no Cancel button on the window.
Presses the Esc key when there is no Cancel button on the window.
Cancel Chooses the Cancel button.
Chooses the X button when there is a Cancel button on the window.
Presses the Esc key when there is a Cancel button on the window.
LookupOK Chooses the OK button.
Chooses an item in the Lookup window.
To close a lookup window, the user chooses the OK button.
2013 version return values are differente from 2009 version
You get OK also if you close the page with Esc key (and this is crazy......)...0 -
majormarcell1988 wrote:Hi there,
CustLedgEntry.SETRANGE("Customer No.","Bill-to Customer No.");
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
CustLedgEntryPage.SETTABLEVIEW(CustLedgEntry);
CustLedgEntryPage.SETRECORD(CustLedgEntry);
IF (CustLedgEntryPage.RUNMODAL = ACTION::OK) THEN
BEGIN
...
END;
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
IF PAGE.RUNMODAL(CustLedgEntryPage,CustLedgEntry) = action::lookupok then begin
end;
try this...0 -
I faced the same problem here(NAV 2013 R2). How should I fix this? I need to know if user clicked the X button or ESC, if they do so, I am suppose to do nothing.0
-
This is not a bug. There is nothing to fix.
They just changed RUNMODAL command behavior.
Read RUNMODAL command description in Dynamics Nav Help.0 -
This is logical and conceptual bug.
How I hate this stupid new navision.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