Hi there!
My scenario is as follows: In PAG42 (Sales Order) in the field for customer name, I open PAG5052 (contact list) via RUNMODAL, select a contact and if the contact has a relation with a customer, I use this customer within the sales order. So far, so good. Everything works fine.
I created a new page action which should do something with this contact before passing it back to the sales order. I wonder how to tell NAV to close the contact list (which runs modal) and use the selected rec while pressing this new button. (Something like PAGE.SETACTION(LookupOK) or so )
Help is highly appreciated.
Rob
PS.: I did a workaround with an Automation (Windows Script Host Object Model'.WshShell) and "SendKeys(ENTER)" OnAction of this PageAction, but I am not satisfied with this solution.
0
Answers
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
So Whats the challenge here??
From Page A you have a drop down which opens Page B, Now if you choose say 5 records then all key values are updated in a TextBox of Page A with comma separator and I assume its working fine. NOw while you open Page B you gave an action button and when u choose the same 5 records and push that Button in Page B it will do some sort of manipulation right and its too an easy Job. Now here once you push that Action Button in Page B You want like manipulation should happen for 5 records along with selecting these records as comma separator in Page A and eventually Page B should get closed. Is that something you really want facing challenge the very last step? Or Still I am Wrong??
See If this is the case then Selecting the records and updating it in Page A will do your Job of Action button manipulation that you need and its easy but vice versa will be something not that straight. First you correct me if we both are on the same Page!
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
There is no challenge at all. Also its not what happens with the records I like to use in page B and the action behind the button.
Normally the user hits OK, clicks the X of the window or presses ESC or Enter and one of various return values are returned to page A.
My question: Is there a way to close page B also with this button I added in page B and returning LookuoOK? For now, I did a workaround with an Automation Variable which mimics pressing Enter, which returns LookupOK. And the code works fine. But isn't there a more elegant way to do it?
Action Button in page B:
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/