A few days ago I ran into a problem that at first drived me crazy. I had a local agent that opened names.nsf on a server and then did a GetDocumentByKey in a view in names.nsf. Although I was sure that a document should be found, Notes did not find anything. When running the agent with the debugger turned on I found out that names.nsf was being opened on the wrong server, in this case on a server in a different domain.
As you can see in the screen print I was trying to open names.nsf on the server P0370000 but it opened on the server P0370900.
At first I was just stunned, ran the script a couple of times more, with the same result, and asked a collegue to check what I was doing wrong, nothing....
After a restart of my Notes client the script ran as it should, but later that day it went wrong again. Since I can only access the server P0370900 via pass-thru through the server P0370000 I began to think it had something to do with pass-thru so I did some testing in that direction.
It turned out that when I did not open aything on the server P0370900 after starting Notes the script ran fine. Once I performed a File, Application, Open on the server P0370900 the script would no longer open names.nsf on the server P0370000 but on the P0370900.
Yesterday, after some conversations with IBM Lotus Support, I discovered that the code will run fine if I use the fully-distinguished servername in the code instead of common name.
But the problem is even worse as I found out today. After having opened a database on the server P0370900 via pass-thru I went to the files tab in the Administrator client for the server P0370000, right clicked on names.nsf and choose 'Open in designer'. As you would expect, the database opened in the designer. But when I clicked on a design element to open it, it opened on the server P0370900....
So, better watch and and check twice if you are really opening the design of a database on the server you want and that your agents do so as well.
IBM Lotus Support will be creating an SPR soon.