This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
I am having an issue with exiting our application that I'm hoping someone will have a solution for. We have a log out button on the tool bar. The RP associated with it does nothing more than an avswitch to *EXIT. We also have axes screens that have framework locking associated with them that will popup up a message confirming that I want to leave when I try to close the panel that the axes screen is running in or when I click the log out button. We are using the avRAMP_QueryCanClose method in the IIP to accomplish this. The problem is that when I click the log out button but answer "cancel" to the confirmation message (meaning that I do not want to leave) I cannot log out after that. All I get is a message at the bottom that says "the session has ended". It also looks like the avSwith to *EXiT is what is causing the avRAMP_QUeryCanClose to be called. It almost looks like internals of the application thinks it has logged out but it hasn't. I can still navigate the application fine. The only thing that I cannot do is log out. Wondering what I am doing wrong.
Mthroutine Name(avRAMP_QueryCanClose) Options(*REDEFINE)
Define_Com Class(#PRIM_DC.UnicodeString) Name(#LockMsg) Value('You have chosen to leave this page, which will result in unsaved data being lost. Are you sure you want to continue?')
#Allow := (#SYS_WEB.Confirm( (#LockMsg) ) = OK)
Endroutine
Trying to log out the first time
2023_04_24_11_35_50_SD_One_Framework.png (212.1 KiB) Viewed 28678 times
Trying to logout the second time
2023_04_24_11_37_25_.png (258.38 KiB) Viewed 28678 times
I tested your avRAMP_QueryCanClose as you coded it and I see the same issue at v15 epc150050.
I see only one Result parameter for that mthroutine and probably one is just enough to say if you go ahead or not with the logout. If you desist, it still allows to navigate normally, but it does not allow you to try to logout again.... I guess you have to be commited the first time you want to logout.
You better report this as a case with support to be fixed.