Nathan -
I'd say it's "somewhat" tested, although I'd certainly welcome more testing (I've tried a backend agent, a scheduled agent, and a web service all on a server).
I know that you can read code, but for anyone else who's reading this thread and doesn't have the code in front of them, here's what happens:
- Check to see if there is a session.CurrentAgent object. If so (which should be the case for all server processes like backend/scheduled agents and web services), don't even go to the new method where we're looking for NotesUIWorkspace.
- If we do end up in the GetWindowTitle function, Dim the local workspace variable as a VARIANT, not a NotesUIWorkspace. This is what used to screw up the server agents (not sure if it still does, but just in case).
- Try to set the workspace variable to a New NotesUIWorkspace. We're using On Error Resume Next here, so if anything completely unexpected happens, we shouldn't crash or totally dump out.
- If we successfully set the NotesUIWorkspace reference, look for CurrentDocument and CurrentView. That should catch most of the cases where we're not running an agent.
- If none of that works, default back to the old "[View or Form Action]" document title.
The problem with older versions of Notes (I think it got fixed somewhere in the Notes 6 codestream) was that just doing a "Dim ws As [New] NotesUIWorkspace" in a backend agent caused things to blow up. These days Notes is much more well-behaved, and I tried to protect against error conditions before I even go down the NotesUIWorkspace route.
But again, more testing would be great. Thanks!
- Julian