Genii Weblog

Getting CoexLinks to create some Notes and some web URLs

Fri 3 Dec 2004, 01:01 PM



by Ben Langhinrichs
A question came up last night, possibly sparked by Crystal's intervention in Luck be a Lady Tonight, about how to actually set up CoexLinks to process doclinks differently depending on whether the database pointed to has been "webified" or not.  If it has, the URL generated should be in the form http://server/db.nsf/view/doc and possibly have some parameters tacked on the end, but if it has not, the URL should be in the form notes://server/db.nsf/view/doc, with no parameters possible.

Fortunately, this requires no scripts or coding for the applications sending the links.  The distinction is made by replica id, and you have a few choices about what is the default and what are the exceptions.  Thus, if you have most of your applications still requiring a Notes client, but have moved a few to the web, you would want the default to be Notes URLs, and you would probably set the following in the server's NOTES.INI, where all CoexLinks parameters are currently set,

COEXDocLinkType=8

which would automatically convert doclinks (or view links or whatever) to the appropriate Notes URL.  Then, for each database that you had webified, you could specify the replica id along with the web URL format you would like to use, using logic such as that below:

COEXMapDBFrom1=852566F10064AC18
COEXMapDBTo1=http://www.GeniiSoft.com/showcase.nsf/%view%/%note%%ext%
COEXMapDBFrom2=852564840021BE86 
COEXMapDBTo2=http://www.GeniiSoft.com/MidasHelp.nsf/%view%/%note%%ext%

You can have up to 50 mapping pairs, with each ending in a number from 1 to 50.  You can also have a default, which has no number and no matching COEXMapDBFrom, but that will change all databases, so it may negate the intent of the COEXDocLinkType:

COEXMapDBTo=http://www.GeniiSoft.com/%db%/%view%/%note%%ext%

Conversely, you can specify

COEXDocLinkType=32 

to create http URLs by default, and then just set a few to Notes URLs (assuming you eventually shift most of them):

COEXMapDBTo1=notes:///showcase.nsf/%view%/%note%
COEXMapDBFrom1=852566F10064AC18
COEXMapDBTo2=notes:///MidasHelp.nsf/%view%/%note%
COEXMapDBFrom2=852564840021BE86 

In this way, you can gradually shift databases from the Notes client to the web and have a smooth easy transition.  

One more important point.  In some cases, you may need to remove the Notes client before a database is webified.  In this case, you can't just point to the http URL, but you also can't just use a Notes URL.  The best solution for this is to build a specialized database with an agent that can handle the appropriate processing for you, such as approving a request  or building an HTML version of the document in the Notes database that has not been webified.  In that case, you could use a mapping such as:

COEXMapDBFrom1=852566F10064AC18
COEXMapDBTo1=http://myserver/redir.nsf/Redirect?OpenAgent&DBID=%dbid%&View=%view%&UNID=%note%&Ext=%ext%

This agent can then be as simple or complex as you need, handling all databases or just a few, or even different forms differently.  If only some forms are webified, it could even figure that out and then redirect you to the http URL if the form was.  That is all up to you and your company's needs.  If this post raises more questions for you, please feel free to ask.

Copyright © 2004 Genii Software Ltd.

What has been said:

No documents found