Hi everyone,
I've written some code in the OnQueryClosePage trigger of a page.
IF CloseAction IN [ACTION::OK,ACTION::LookupOK] THEN BEGIN
fctXXX();
Rec.NEXT;
END;
The code in fctXXX() is executed but the page closes anyway (whether there is a next record or not).
Is there a way to prevent the page from closing if there is a next record?
Thanks in advance
Answers
To stop the page from closing you need to return false. This should do the trick.
with best regards
Jens
OK, but is it possible to move the page to the next record?
trigger OnQueryClosePage(CloseAction: Action): Boolean
var
ok: Boolean;
begin
if amount1 <> amount2 then
ok := Confirm(ValidateAmountLbl, false);
exit(ok);
end;