OnQueryClosePage - Move the page to next record

Hi everyone,

I’ve written some code in the OnQueryClosePage trigger of a page.

I want that when the user clicks OK, the page moves to the next record instead of closing.

IF CloseAction IN [ACTION::OK,ACTION::LookupOK] THEN BEGIN
fctXXX();
IF Rec.NEXT <> 0 THEN

EXIT(FALSE);
END;

With this code, the page does not close but doesn’t move to the next record either.

How shall I do it?

Thanks in advance

HI ,
There is a workaround I.e you can call Another Page by Using Page Number and Record
Like this
IF CloseAction IN [ACTION::OK,ACTION::LookupOK] THEN BEGIN
IF Rec.NEXT <> 0 THEN
PAGE.RUNMODAL(30,Rec); //30 is Page Number
END;

Have you tried inserting a CurrPage.UPDATE?

Thanks, you made my day !

Very Happy To Hear that.