Use a Macro to Perform an Infor VISUAL Enterprise Window Refresh

Especially if you are using an OnAfterSave macro, you may be looking for a way to update the screen with the latest information from the database. While there is not a particularly elegant way to do this, using VBScript SendKeys gets the job done. Here we locate a window with the title “Estimating Window” and send the keystrokes for Alt+F and then the F key again:

'Send the Alt-F-F sequence to Refresh the view 
Set objShell = CreateObject ("Wscript.shell") 
objShell.AppActivate("Estimating Window") 
objShell.SendKeys("%FF")

And while a part of you may cringe at the notion of locating windows by title and sending keystrokes, this does present options for integrations - even outside of VISUAL. In the past we did a Stamps.com integration entirely using this technique and, while it wasn’t pretty, it was a lot better than the available alternatives.

Did this blog help you out at all? If so, please leave me a comment. Same if you have any challenges — I’m here to help! Lastly, if you are looking at this and realizing you want something like it but prefer to have me do it for you, please reach out!