sullyman Posted February 3, 2008 Posted February 3, 2008 (edited) Hi Folks, I have the following script that works great when i open the database and use it on the Purchase Order Layout. The user can see the record in preview mode and when they hit the Enter Key, it cancels out of Preview mode and returns the user to Browse Mode. Then they can choose another record to Preview and the script runs again fine. But when i go to another layout and use another copy of this script with the appropriate layout references changed, it does not allow the user to hit the enter key and return to browse mode. Then if i go back to where i know it works on the Purchase Order Layout, it doesn't work again. Only when i close the database and reopen it again, the script works fine again on the Purchase Order Layout only. Any Ideas please. New Window [] Show All Records Omit Record Show Omitted Only Show/Hide Status Area [show] Go To Layout ["Purchase Order Print Form"] Sort Records [Restore;No Dialog] Print Setup [Restore;No Dialog] Enter Preview Mode [] Go to Record/Request/Page/[Last] Set Field [Global_Table::gGetPageCount; Get (PageNumber)] Go to Record/Request/Page [First] Refresh Window [] Pause/Resume Script [indefinetly] Allow User Abort [On] Enter Browse Mode [] Show/Hide Status Area [show] Go to Layout [Purchase Order Input Form] Extend Found Set [] Enter Browse Mode [] Exit Script [] Edited February 3, 2008 by Guest
Inky Phil Posted February 4, 2008 Posted February 4, 2008 HI Sully I cannot see where you are closing the new window that you are creating in the first step. Not knowing the context that you are running the script in I do not know if that is a problem but since you have 9 advanced have you tried switching the debugger on. This will allow you to see what is happening step by step through your script Phil
bcooney Posted February 4, 2008 Posted February 4, 2008 I agree with Phil, you are creating a new window but not closing it. Also, why do you need the Exit Script at the end? It would be helpful to know if the TO for the Purchase Order Print is the same as the TO for the original layout bcs you're isolating a record for preview and then switching layouts (are you switching TOs?).
Recommended Posts
This topic is 6136 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now