I got a phone call from a client a few weeks ago reporting a bug. From his non-technical description I knew what the problem was straightaway. Luckily I was due on-site the next day, so I could fix it then and save some face in the process.
The problem was the view.GetDocumentByKey(key) method. Well, the problem was my coding actually, but hear me out while I pass the blame on to Lotus (as I did with the client, who agrees with what I am about to say). As we all know there is an optional argument to this method called ExactMatch. My code didn't set this to True and so the code didn't run as I had expected. Even with my, ahem, extensive testing I failed to account for what can happen when Notes decides it's found a "match".
What I can't fathom is why on earth the ExactMatch option defaults to False? Who has ever used it with False? Why?
This time I swore I would learn and always be sure to set the argument to True. I'm now going to run up and down the street naked, screaming "I must set ExactMatch to True", while giving myself a good twigging.