TechnicallyChris.com

Technical and Personal Ramblings of a Bostonian
  • Home
  • About Chris
  • Donate
  • Contact Chris
Home > ColdFusion > Linking to a Lotus Notes Page with ColdFusion

Linking to a Lotus Notes Page with ColdFusion

September 30th, 2006
Goto comments Leave a comment

I don’t know much about the world of Domino, but I’ve done my share of integration with Lotus Notes in the last couple of years. Usually, it’s by 3rd party apps and poor hacks. They really don’t make it easy sometimes. Recently, I wanted to link an Intranet application to a Lotus Notes Yellow Pages type database. The goal was to be able to select a person from my application, hit a link, and popup a copy of that persons entry in the yellow pages. The database was already setup by the Domino folks to be web accessable, however I wanted to go right to a specific record.

The first thing I learned was that the first sorted column in any given Lotus Notes view is the Key. So, the first thing I did was to find a view that had the data I needed, with the key being the ID of the users in the database (which I had in my Intranet application).

Next, I found that, as long as the database is Internet ready (not sure of the Domino term), you can access it like so:

http://servername/databasepath/databasefile.nsf/viewname/keyvalue?opendocument

The parameter “opendocument” should be static – that is the command to get the document. Everything else in that statement should be replaced to reflect your evironment and database. After getting this to work outside of my application, I used CFHTTP to get the document I needed from the server, and pass it back to the user.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<cfset variables.domPath = 'http://servername/databasepath/databasefile.nsf/viewname/' & form.id & '?opendocument'>
 
<cfhttp url="#variables.domPath#" redirect="yes" resolveurl="yes" result="domPage" />
 
<cfif isDefined('domPage.ErrorDetail') and domPage.ErrorDetail neq ''>
 <script language="javascript">
  alert('Unable to connect to the Domino Server.');
  window.close();
 </script>
 <cfabort>
</cfif>
 
<cfif domPage.responseHeader.status_code neq 200>
 <script language="javascript">
  alert('Unable to find any such Record.');
  window.close();
 </script>
 <cfabort>
</cfif>
 
<cfoutput>#domPage.fileContent#</cfoutput>

I just pass an ID to the page (which is the unique identifier), and I get the data and pass it back to the user. You could also, of course, just forward the user right to the page. I opted to go the route of having the ColdFusion application get the data to reduce the likelyhood of errors if the user didn’t have access to the Domino server.

Hope this helps someone!

If you enjoyed this article or it helped you in any way, I’d appreciate it if you’d post a comment below to let me know. All code examples are for demonstration only and should be used at your own risk. I cannot accept liability for unexpected results.

Chris ColdFusion ColdFusion, Lotus Notes

Comments (0) Trackbacks (0) Leave a comment Trackback
  1. No comments yet.
  1. No trackbacks yet.
Subscribe to comments feed
Getting Firefox to Support Integrated Windows Authentication Potential Fix for Error 401 When Using RDS with ColdFusion
RSS feed
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Sponsored By

Read my review of Mozy here.

Recent Posts

  • Just Bought the Google Nexus One
  • Seven Things I’ve Liked About Windows 7 in Seven Day
  • What’s Happened to Customer Service (Part 2)?
  • What’s Happened to Customer Service (Part 1)?
  • Capturing S.M.A.R.T. Hard Disk Data from WMI with AutoIt
  • Adjusting DCOM Settings via Script
  • How to Manually Call the Google Cache
  • RoboForm & RoboForm2Go Product Review
  • Updated PingCell Function for Excel
  • Creating Hyperlinks in Word and Excel Longer than 256 Characters

Categories

  • ColdFusion
  • Firefox
  • Google Nexus One
  • IIS
  • McAfee EE / SafeBoot
  • Microsoft Windows
  • Oracle
  • Random Code
  • Random Technology
  • Sports and Recreation
  • Subversion
  • The Untechnological

Archives

  • January 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • October 2007
  • September 2007
  • August 2007
  • January 2007
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006

Meta

  • Register
  • Log in
PageRank
Top WordPress
Copyright © 2006-2010 TechnicallyChris.com
Theme by mg12. Valid XHTML 1.1 and CSS 3.