Hi everyone,
I have a list page with several columns and an OK button.
I need to do the following: If column A is not filled by the user then he shouldn't be able to close the apge.
Here is the code I've written so far:
IF PAGE.RUNMODAL(PageX,RecX) = ACTION::LookupOK THEN BEGIN
//SOME CODE HERE that
IF (fieldXXX= TRUE) THEN ERROR(TextXX);
//SOME OTHER CODE HERE
END;
The problem with that code is that the user is still able to close the page and after that the error message appears.
How can I correct that to get the behaviour I want?
Thanks in advance
Comments
The problem lies in the fact that you are checking the fields after the Page.RUNMODAL() call. At that moment, the page is already closed.
You should put your validation checks on the page itself in the "OnQueryClosePage" trigger and return false, if something needs to be corrected by the user. I.e.:
B3 Technologies - Making Technology Serve the People