Wednesday, April 11, 2012

Use replica ID in @DbLookup with caution

Few days back I was faced with an issue where a user reported the following error message while opening a form in Lotus Notes client:

Field '<FIELD NAME>': Connection denied. The server you connected to has a different name from the one requested.

While this thing was working at almost all other machines (including mine), it was just one user where it was not working. The formula on the field was a single line database lookup as:

After unsuccessfully going over technotes, forums and blogs I went back to help documentation for @DbLookup and something caught my attention.

If there are multiple copies of the database located on various Domino servers, using the database replica ID in place of both the server and database name lets you access a replica copy of that database without having to specify either the server name or the database name. For example, if you use "85255CEB:0032AC04" (a database replica ID, found in the database InfoBox) as the database name, Lotus Domino uses a replica of the database to retrieve the information.

Lotus Domino searches for replicas in this order, using the first replica it encounters:
  • Workspace
    If there is one replica on your workspace, Lotus Domino uses it.
    If there are multiple, stacked replicas on your workspace, Lotus Domino uses the replica on top of the stack.
    If there are multiple, unstacked replicas on your workspace, Lotus Domino looks for an icon matching your current server and uses that. If none of the icons matches your current server, Lotus Domino uses the icon that was added to your workspace first.
  • Current server
  • Locally (your hard disk)
Once a replica is located, it's added to your workspace to save time on future lookups.

- Excerpt from help documentation

If you notice, my lookup formula is using a replica ID and according to help in that case Lotus Notes will first search for that replica on the workspace. So I checked user's workspace and it had only one icon for that database on a server which we had shutdown few days back. I removed the database icon from the workspace and everything was normal.

Moral of the story: Google doesn't help all the time... :)

No comments:

Post a Comment