[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2511
  • Last Modified:

How to Create Links to Lotus Notes Tickets

I have a website and I'd like to create URL links to Lotus Notes items.

The links will be like this: Notes://SERVER/123456789/****

Each item has a unique generated ID. Can someone explain how this unique id is generated and if it's possible to map to it?
0
deharvy
Asked:
deharvy
  • 11
  • 7
  • 5
  • +2
1 Solution
 
SysExpertCommented:
this is based on th UNID that is created for each document in Notes


I hope this helps !
0
 
SysExpertCommented:
From one of the help files

 In Notes 6 and higher, the notes:// URL of a database, view, form, or document can be determined using the NotesURL property of the element when it's accessed in LotusScript as a NotesDatabase, NotesView, NotesForm, or NotesDocument. If you want to construct a notes:// URL manually, it's of the structure:
    * notes://servername/databaseName?OpenDatabase or notes://servername/__dbReplicaID?OpenDatabase for a database
    * notes://servername/databaseName/viewName?OpenView or notes://servername/__dbReplicaID/viewUNID?OpenView for a view
    * notes://servername/databaseName/formName?OpenForm or notes://servername/__dbReplicaID/formUNID?OpenForm for a form
    * notes://servername/databaseName/0/documentUNID?OpenDocument or notes://servername/__dbReplicaID/0/documentUNID?OpenDocument for a document

I hope this helps !


0
 
deharvyAuthor Commented:
Thanks SysExpert. That did help.

However, I'm just trying to figure out how to convert a document name into a documentUNID.

Is there some sort of consistent conversion.

If a document name is 12345, can I assume the documentUNID is going to be xxxxxxxxxxx.

Maybe it's not possible. Maybe there is no way since Lotus generates a randome documentUNID. My question really is how random is the documentUNID?
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
brwwigginsCommented:
Here is an document on how the doc ID is generated and used
http://www-12.lotus.com/ldd/doc/tools/c/6.5/api65ug.nsf/85255d56004d2bfd85255b1800631684/00d000c1005800c985255e0e00726863?OpenDocument

There isn't really a "document name" in notes. You have the form and you have fields. The document is created from one form but can be viewed by a different one
0
 
SysExpertCommented:
UNID is semi random, and has no connection to a document name, since you can have multiple documents with the exact same name.

0
 
deharvyAuthor Commented:
Ok. Based on all information provided, It appears that what I was requesting is impossible. I wasn't taking the best approach. So, let me try to start again.

I have a link that opens up the database. I was able to find this via the 'Identifier' column of one of the items. Is there a way to link to this database and add search criteria? My goal is to put something in the search box and submit the request. Can this be done via a link?
0
 
SysExpertCommented:
Not quite sure I understand.

Please start from the beginning with a little more detail.

0
 
Steve KnightIT ConsultancyCommented:
Havne't looked in detail through what you have there already and the what the links point to so sorry if duplicating but I imagine what you are wanting is:

1. Create a view in the databae (or use / find an existing one) that has the first column sorted by the document reference number field or whatever it is you want to lookup.
2. Create a link as follows notes://server/dbname.nsf/ThatViewname/documentrefno?OpenDocument

That will use documentrefno as a key into thre view ThatViewname to retrieve the document.  It also works with the same syntax from a browser using http:// of course.

Steve
0
 
deharvyAuthor Commented:
Ok. I read the documents and tried all types of scenarios, but none seem to be working. So, here is my final attempt at this thing. :)

When I right click on a document, this is what I get:

Sample Subject Header
<NDL>
<REPLICA 3GMNABX:FTCD6J6>
<VIEW OFNLTDX96:GPLBD96-ZKYFM6A:SPAWBK7>
<NOTE OFB2A4LTQ:NR2R3KY-P4GCPNNN:006624A0>
<HINT>CN=LOCATION/O=DOMAIN</HINT>
<REM>Database 'Database', View 'All By Date', Document 'Sample Subject Header'</REM>
</NDL>

Sample Subject Header 2/rep
<NDL>
<REPLICA 3GMNABX:FTCD6J6>
<VIEW OFNLTDX96:GPLBD96-ZKYFM6A:SPAWBK7>
<NOTE OFC02DD3DD:8P28HD4-P4GCPNNN:N65VTRW>
<HINT>CN=LOCATION/O=DOMAIN</HINT>
<REM>Database 'Database', View 'All By Date', Document 'Sample Subject Header 2/rep'</REM>
</NDL>

Now, if I go to my IE browser, and type this:

notes://LOCATION/3GMNABXFTCD6J6/NLTDX96GPLBD96ZKYFM6ASPAWBK7

It opens up Lotus Notes, and opens up the to the main page of the proper database.

The goal is to search those documents, similar to if I go to the search field, type XXX and hit 'Search'.

I tried:

notes://LOCATION/3GMNABXFTCD6J6/NLTDX96GPLBD96ZKYFM6ASPAWBK7/$SearchSite?SearchView&Query=XXX

But that didn't work. It continues to take me back to the main page. No search is done.

If anyone has a solution for this, that would be awesome. If it's not possible, let me know and I'll forget about it.
0
 
deharvyAuthor Commented:
SysExpert: You have been great. Thanks for your help; unfortunately, nothing I try seems to work. I'll survive though. :)
0
 
qwaleteeCommented:
I don't understand why this shoudl be deleted. There's a otof relevant back and forth. I think deharvy's frustration is that he's having trouble communicating exactly what he wants to do, so he's getting back answers that don'tr match what he wants, though they sort of match the way he's described it.

Incidentally, what you are asking for is probably possible, but it partially depends on what interface you want to use for searching, and whether the search should start in the browser or Notes, and whether the results hsould display in the browser or in Notes.
0
 
deharvyAuthor Commented:
Ok. Good point.

The search should start from the browser and the results should be displayed in notes.

Let me know if you need any other information.
0
 
Steve KnightIT ConsultancyCommented:
Agreed.... either need to build a search string, or search using known views and keys (or combination of keys).  Anythign is possible in Notes...
0
 
deharvyAuthor Commented:
Ok. So, where do we continue from?

I have a link that works. notes://LOCATION/3GMNABXFTCD6J6/NLTDX96GPLBD96ZKYFM6ASPAWBK7/

This brings up the proper database. I just need to be able to indicate a link that will filter/search for items in Lotus Notes.
0
 
qwaleteeCommented:
What you need to do is write a form that allows the user to enter the query, and an agent to process the form. The agent output will format HTML in the format:

<A HREF="notes://server/databasefile.nsf/view/32-digit-unid">Descriptive text</A><BR>

This will create a clickable link that will allow the user to click through to the Notes document.

However, I really have to wonder why you would start with the browser and end in Notes!!!
0
 
deharvyAuthor Commented:
I agree with you.

This syntax works:

notes://server/databasefile.nsf/view/32-digit-unid

If I use this link from the browser, it opens up the proper link to the document.

I don't have the luxury of knowing every 32-digit-inid.

So, in Lotus Notes, I'd like to invoke a search in the "view" that would search every document in "view" and give results.

I can imagine something like this; but it doesn't work:

notes://server/databasefile.nsf/view?Query=test123

This should open up Lotus Notes, start a search of through all documents and display all documents that include test123 in the title or body.

I hope this is clear.
0
 
brwwigginsCommented:
To be honest, I don't know if you can pass parameters from a browser into the notes client application and have Notes act on them then return the results in notes

It will be interesting to see if someone comes up with a solution since I've never seen this before
0
 
qwaleteeCommented:
Yes, you can do the saerch,m without knowing every UNID in advance. You have to code a script to process a search request. For each matching document, the SCRIPT can, on the fly, get the UNID and output the URL.

However, why not just let them search within Notes? There's a search bar built in.
0
 
deharvyAuthor Commented:
The goal is for them to search within notes. But for the link to do most of the work for them. I want to use the Search Bar; but automatically place the value in the Search Bar for the user and hit 'enter'.
0
 
Steve KnightIT ConsultancyCommented:
So why not just write a search form in Notes if you wish that takes the values you want to search for and uses LotusScript to add the results to a folder or the like?... or just use the search bar.  I've made some very complicated search pages over the years for customers when they could do the same thing with one or two more clicks by using "search by form" or similar.
0
 
deharvyAuthor Commented:
I am not the Lotus Admin. I just host a website that I want to link to notes.
0
 
qwaleteeCommented:
Again, I'm not getting why this starts from the browser.  But let's say you create a form in Notes with the following (we will display this form on the web):

Form has three fields

First field
Name: Query
Type: Text / Editable

Second field
Name: $$Return
Type: Text / Computed for display
Formula:
ticketLookupView := "name of view that sorts documents by ticket #";
ticketNum := Query;
result := @DbLookup(""; ""; ticketLookupView; ticketNum; 1; [RETURNDOCUMENTUNIQUEID]);
@If(@IsError(result); "Searching for " + Query + " resulted in error " + @Text(result) +". Please press BACK and try again."; "Click <A HREF=notes:///" + @ReplicaID + "/0/" + result + ">here</A> to open this ticket in Lotus Notes.")

Third field
Name: SaveOptions
Type: text / Computed for display
Formula:
@Text(@False)

Add a button to the bottom of the form. the formula for the button is:
@Command([FileSave]);
0
 
deharvyAuthor Commented:
Do I add this code to my PHP page?
0
 
qwaleteeCommented:
No, you put this form in the Notes database that has the tickets. It function sas a web page, which your PHP page can link to. or, you could copy the code into PHP.

Or, you could integrate your PHP with the Notes API, and do all the work yourself. Install a Notes client on the PHP server, and you can reference the Notes objects from PHP. The COM objects, methods and properties you will wantto use are:

lotus.notessession
lotus.notessession.initialize
lotus.notessession.getdatabase
lotus.notesdatabase.replicaid (or lotus.notesdatabase.server and lotus.notesdatabase.filepath)
lotus.notesdatabase.getview
lotus.notesview.getdocumentbykey
lotus.notesdocument.universalid
0
 
qwaleteeCommented:
Oh, BTW, I left a coding error in. Where I have @ReplicaID, it shoudl be @ReplaceSubstring(@ReplicaID; ":"; "")

Othertwise you'll get an error when you click the link, because the replica ID will contain an extraneous colon.
0
 
deharvyAuthor Commented:
Thanks for all your help.

I'm unable to create this form and run these commands in Notes.

And installing a Lotus Notes client is not possible since my php is being hosted externally.

But I like your solution and I'm sure it's the correct one.

Is there any other way to integrate into PHP without a notes client?
0
 
qwaleteeCommented:
There are only two ways to access Notes:

1) directly use the Notes API in various formats

2) use pure web interfaces

For #1, the APi is available as:
a) low-level APIs (Known as C and C++ APIs)
b) LotusScript APIs
c) OLE Automation API
d) COM interface
e) CORBA/IIOP

a-d require a Notes client or Domino server be present on the same machine. (e) does not require the Notes client, since it is remoting the calls to a Domino server. If you have a way to bridge from PHP into Java-based CORBA, then you have a good way in.

For #2, there are some XML interfaces which you may be able to use. In particular, there are XML interfaces for Notes view data. If you have a view that sorts on teh key you wish to use, then you can craft a URL which will return XML for the row of the view that natches that key. Part of the returned XML will include the document idnetifier, which you can then use to create a notes:// URL.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 11
  • 7
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now