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.
0
Comments
Confirmed, it's a bug.
Tested on build 35796.
Matteo
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.
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......)...
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
IF PAGE.RUNMODAL(CustLedgEntryPage,CustLedgEntry) = action::lookupok then begin
end;
try this...
They just changed RUNMODAL command behavior.
Read RUNMODAL command description in Dynamics Nav Help.
How I hate this stupid new navision.