I have a view of documents(doc 1). I use an action button in this view to launch a URL to an associated document(doc 2) in another view, in another database.
The code behind the button is as follows:
Server := @Subset(@DbName; 1);
CNServer := @Name([CN]; Server);
FIELD sUNID := sUNID;
urlStr := “NOTES://” + CNServer + “/cms3\database.nsf/vL01/” + sUNID + “?OpenDocument”;
@URLOpen( urlStr );
@All
This works fine on one database, but not on the other. The views first column is sorted by the field sUNID in both examples. The code behind both examples is identical, as I copied and pasted, and simply changed the necessary view name.
Anyone any ideas why it works in one and not the other?
Thanks in advance…
Subject: NOTES URL’s
Couple of suggestions.
Use the common form of the server name.
Don’t include a path. Use the replica id instead.
Don’t include a view name. Use “0” instead. You don’t need a view name (or alternately, view unid) unless the view contains a form formula that you want used in opening the document.
And is this for browser clients or for the Notes client?
Subject: RE: NOTES URL’s
Thanks for your help, which kinda helped. I found that using KEY clearly wasn’t working, so I added the doc id to the view, and opened using this. Bit long winded as I had to do 2 lookups, but at least it works:
Server := @Subset(@DbName; 1);
CNServer := @Name([CN]; Server);
UNID := @DbLookup( “”:“NoCache”; Server:“cms3/cms3claims.nsf”; “vL01”; sUNID; 3 );
urlStr := “notes://” + CNServer + “/cms3\CMS3Claims.nsf/0/” + UNID + “?OpenDocument”;
@URLOpen( urlStr )