03-27-2012 07:52 PM
Hello Everyone,
I noticed that the open event only runs when clicking on actsage.exe, if you click on a .pad file to open act this event does not run. This is a problem for me as I need to run code only after everything is completely loaded and as far as I can tell the open event is the only event that runs at that point. Does anyone know of a way around this?
Matt
03-28-2012 06:52 AM
Performing any heavy lifting prior to the AfterLogon event is not recommended and can have a significant impact on load times. I'd suggest doing whatever work needs to be done AfterLogon or later.
03-28-2012 08:12 AM
Thats kinda my problem, I want to run code sometime after the AfterLogon event however I am having a hard time trying to find an event that runs once everything is loaded, running code on the afterlogon event does not work as not everything is loaded yet, using the open event only works if the actsage.exe is used to open act so that does not work, i am looking to see if there is any other way.
03-28-2012 08:31 AM
There are events that follow AfterLogon, for instance ViewLoaded occurs once all of the data is loaded and the current view is loaded, the only things that haven't been loaded at this point are views that aren't your default view and these will load in the background over the first minute or so that your in the application. If you do not need these views immediately, then everything that you'd need to be loaded should be done by ViewLoaded.
03-28-2012 08:44 AM
Yah the problem with view loaded is the toolbar and navbar are not loaded at this point and thats what I am trying to manipulate, I guess I will have to use the open event and find someway to run my code when someone clicks on the .pad file specifically, i might have to run the code when they change views for the second time, after everything is loaded, the only problem with that is that when act first opens my code changes will not be present until the navigate to a different view. Oh well, thanks for your help matthew I will figure something out. Its weird though that the open event does not work for .pad openings, hopefully they address that in the next version or update.
03-28-2012 08:52 AM
In the sample in the SDk and a few test applications I use here, I add a new menu item and icon both in the AfterLogon event and they're added without an issue. There's certainly other places you could do you're work (ContactChanged, ContactUpdated, FieldChanged etc) but you shouldn't need to do so.
03-29-2012 10:14 AM
I am not trying to add a menu item I am trying to modify the related tasks section, which can only be done after its loaded so unfortunetly none of those events you mentioned seem to work.