The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Enducing a key press in script
Posted: 24 Sep 09 8:34 AM
|
I have created a button on the Activity Details form that updates any changes to the database. Once the form closes and the user is taken back to the Main View they can not see these changes unless they press F5 on the all open activities data grid, or ctrl+F5 on the Opportunity Activities datagrid. Can i force the action that occurs on these key presses in script? |
|
|
|
Re: Enducing a key press in script
Posted: 24 Sep 09 1:10 PM
|
You can try the following methods: - Application.BasicFunctions.DoInvoke "Function", "View:Refresh" 'CTRL+F5 - Application.BasicFunctions.DoInvoke "Function", "View:RefreshCurrent" 'F5 - MainView.Refresh
|
|
|
|
Re: Enducing a key press in script
Posted: 25 Sep 09 6:35 AM
|
Beside the methods above you could use a VBScript:
option explicit
' simulate F5 Sub RefreshF5 Dim wshShell Set wshShell = CreateObject("WScript.Shell") wshShell.SendKeys ("{F5}") Set wshShell = Nothing end sub ' simulate CTRL + F5 Sub RefreshCtrlF5 Dim wshShell Set wshShell = CreateObject("WScript.Shell") wshShell.SendKeys ("^{F5}") Set wshShell = Nothing end sub
Cheers, Thomas |
|
|
|