Lotus Notes FAQ Visit Our Sponsor!

Lotus Notes Frequently Asked Questions
(Notes/Domino 6.x)

A. Administration Tips


1. How do you run the Compact process on a schedule?

2. What Virus scanning packages are available for Notes?
3. What can be done to optimize database performance?
4. How do you make a list of all groups a person is in?
5. Can you keep multiple versions of Notes on the same system?
6. How do you get rid of all the deletion stubs in a database?
7. How can you have multiple users on one workstation?
8. Can you run console commands from a server program document?
9. What are .IIB files?
10. How do you secure WebSphere
11. How do you use Smart Upgrade?
12. Can you replicate mail immediately when you get a new mail notification in the Notes client?
13. How do you get the server to recognize changes to groups immediately?
14. Can you run SpamAssassin on a Notes server?
15. Can you prevent Internet mail from being sent to groups?
16. Can Domino prevent MS viruses from getting into user's mailboxes?
17. How do you set up S/MIME?
18. Why does a Mail Rule seem to keep running even after it's deleted?
19. Can users recall messages they've sent?
20. Can you forward a copy of a user's mail and keep it in their mailbox?
21. How Do You Set Up Failover for Outbound SMTP Mail?
22. Why is my Notes client having trouble replicating over satellite links?
23. Can you find out how long views take to rebuild?
24. Can you have an Apache server handle Domino URLs on a different box?
25. How do you enable folder references for a database?
26. How do you get a list of inactive databases?
27. What events cause the user ID to be backed up into the recovery database?
28. What can I check if my server is running too slow?
29. Does Domino Support Wildcard SSL Certificates?
30. How Do You Rebuild Busytime?
31. How Do You Fix the "Error connecting to server " Error?
32. Does "Optimize document table map" Cause View Index Corruption?
33. Why do I get the "Maximum allowable documents exceeded for a temporary index" in the Notes Log?

B. Books and Magazines


1. IBM Redbooks
2. Helpful Non-Notes Books
3. Lotus Notes Magazines

C. Domino


1. How do you replace the "No Documents Found" message in an empty view?
2. Can you set Notes fields from JavaScript?
3. How do you remove Domino's default submit button?
4. Can you display a text field as a TEXTAREA?
5. How do you add a Javascript button which validates the form and then submits it?
6. How do you display a list of response docs on the parent document?
7. How do you get rid of the ecblank.gif in generated HTML?
8. How do you Single-Sign On (SSO) if you use the JSP Tag Library?
9. How do you switch tabs in tabbed tables?
10. How do you handle "Allow Values Not In List" dialogs on the web?
11. How do you get the relative path to the database for web URLs?
12. Can You Do AJAX Applications with Domino?
13. How do you get colored tabs in a tabbed table?
14. Can You Run PHP Pages on a Domino Server?
15. How do you make a database open a form by default from the web?

D. Education and Training


1. Computer Based Training
2. Virtual Classes via the Internet
3. Lotus Education Helpline

E. FTP Archives


1. Notes Utilities
2. Notes Related Programs or Information

F. Mail Gateways


1. OfficeVision and SNADS
2. PalmPilot
3. FAX
4. POP3
5. Migration Tools
6. MS Exchange <-> Lotus Notes
7. Windows CE/Pocket PC/Windows Mobile
8. Notes <-> Rex Organizer
9. Outlook to Domino

G. Mailing Lists


1. LNotes-L
2. DominoLinux
3. Oklahoma State Notes-L
4. NotesMac
5. Oklahoma State Domino-L
6. NotesMTA-L
7. Portugese Notes Users Mailing List
8. David Stephens' Lotus Product/Event News
9. LNotes-J
10. Yahoo LNotes-L Group
11. Domino on iSeries (AS/400)
12. LNotes-L on Yahoo

H. Notes Platforms


1. Where can I find info on Mac-specific (not Notes-related) problems?
2. What is a good entry-level AS/400 system?
3. Can you run the Notes Client on Linux?
4. How do you install and secure Domino on Linux?
5. What are common useful commands for the AS/400?
6. How do you install Domino 6 on RedHat 8/9?
7. How do you get LS:DO working on Linux?
8. How big an AS/400 do I need for Domino?
9. How do you install Domino 6 on a Debian-based Linux?
10. How do you start/stop Domino on Linux automatically?
11. Do I have to install the Notes/Domino Server on Windows Server?

I. Programming Tips


1. How do you delete a profile document?
2. What HelpDesk products are available for Notes?
3. How do you calculate the week number in a year of a given date?
4. How do you display a custom image in a Notes view?
5. Can you stop the refresh view indicator for displaying if you use @Today in a view?
6. How do you prevent jagged right table edges when merging/splitting cells?
7. How do you pass information between UI windows or frames in Notes?
8. How do you synchronize custom databases with PDAs?
9. How do you debug Notes/Domino Java Agents using Eclipse?
10. How do you copy a view/folder's design into another view/folder?
11. How do you show the search bar automatically in a specific view?
12. How do you specify database categories in Domain Full-Text Search?
13. What Are Domino's Field Size Limits?
14. How do you do an SSL POST from a Java Agent?
15. Can you use Notes objects in LS2J Java code?
16. How do you create a database that contains encrypted web-submitted documents?
17. How do you output a PDF from Notes?
18. How do you create a NotesDocumentCollection?
19. How Do the C&S Forms/Fields Work Together?
20. How do you create tables with rounded corners in Notes?
21. How do you get the HTML for a Rich Text field?
22. How do you disable NSD so exceptions go to Visual Studio?
23. What causes "Entry Not Found In Index" Errors?

J. Programming Tips - LotusScript


1. Can LotusScript operate on Private Views?
2. Can you add a database to the replicator page?
3. Can you refresh a document in the Notes client after changing a rich text field?
4. How do you track who deleted a document?
5. How Do You Run Console Commands From Lotuscript?
6. How do you find out if a document has been foldered?
7. How do you export to an OpenOffice Calc spreadsheet?
8. How do you open a File Dialog in LotusScript?
9. How do you edit a rich text field in an open document and redisplay it?
10. How do you find out if there is default view?

K. Programming Tips - @Formula


1. How do you scan an image into a rich text field using a button?
2. How do you unlock a document

L. Web Sites


1. Companies with Notes Applications
2. Sources of Notes API Information
3. Local User Groups
4. Notes Related Web Sites
5. Mirrors Sites for the Notes FAQ
6. Non-Notes Web Sites
7. What Notes Related RSS Feeds Are There?


How do you run the Compact process on a schedule?

Here is an example program document you can use. Make sure the Notes directory is in your system PATH.

Basics
Program name: $COMPACT.EXE
Command line: -S 5
Server to run on: ServerName/Domain
Comments: Compact databases with more than 5 percent whitespace.

Schedule
Enabled/disabled: ENABLED
Run at times: 10:10 PM each day
Repeat interval of: 0 minutes
Days of week: Wed, Sat


Note that if you are running DAOS in Domino 8.x+, you'll have to add the -B flag for the database to shrink free space properly.


What Virus scanning packages are available for Notes?

* McAfee's GroupShield and GroupScan (includes AIX)
* Trend Micro's ScanMail for Lotus Notes (includes AIX support)
* Group-WG's WatchDog
* Cheyenne's InnocuLAN for Notes
* Symantec's Norton Antivirus for Notes (includes Unix, AS/400 and S/390; Linux soon)
* Command AntiVirus for Lotus Notes
* Panda AntiVirus for Lotus Notes
* Sophos Mail Monitor
* Die Avast! Domino Edition
* Kaspersky AntiVirus (includes Linux)
* ESET's NOD32 for Lotus Domino


What can be done to optimize database performance?

1. Don't have too many views - each time you change/add a document Notes will need to update every appropriate view.

2. Keep views simple - more columns means more calculation. It gets worse if the columns are sorted and worse still if the columns are categorized.

3. Don't use @Today or @Now in selection formulas - the views will never be up to date and the server will be forever recalculating them. If you need to use today's date in a selection formula then have a background macro running each day to set an environment variable in the server's notes.ini and reference this.

4. If you want to display compound information in a view column from multiple fields then calculate it in a hidden document field. The column should then reference this single field rather than carrying out the calculation.

5. To avoid the @DBColumns/@DBLookups used to generate keyword lists, etc.,
being generated at read time use something like:

@If(@IsDocBeingLoaded & !@IsNewDoc; @Unavailable; @DbColumn(""; ""; "By _Category (Main View)"))

for the formula. Editing documents will take just as long but document readers will notice a big improvement. The example above is from a keyword format formula.

6. Use column numbers not field names for lookups

7. If you are doing lots of lookups to multiple columns in a single view then append all of the data in a single column with a unique delimiter string and do a single lookup. The value returned can then be parsed with @Left/@Right/@Mid or @Explode to give you the separate field values.

8. Put 64 Mb of RAM in the server and push the buffer pool sizes to their limits. This is documented in the Knowledge Base.

An IBM Redbook is also available: Performance Considerations for Domino Applications.

A developerWorks article is also available: Troubleshooting Application Performance

How do you make a list of all groups a person is in?

Create view in the NAB with a selection formula of "Select (Form = "Group").
Add the field 'Members' in first column.
In the propeties box for the first column, select sorting type 'categorized' and select 'show multiple values as separate entries'.
In the second column, put the field 'ListName'.

This is not recursive, so it won't show a person in a nested group.


An alternative way (from chowell@epd.renold.com) is to:
1) Load the Name & Address Book D/Base and select the "Groups" view
2) Enable the Search Bar (View, Search Bar) - the NAB has to be full text indexed
3) Key in the name of the person you are seeking - the Groups of which they are a member are identified in the view
or use the search string:

  FIELD Members contains "username or groupname" 

so you avoid false hits on the ListOwner and LocalAdmin fields.

And another way using the Notes API from agorlenko@manu.com but this only works on R5+:


Declare Function NSFBuildNamesList Lib "NNOTES" Alias "NSFBuildNamesList" _
( Byval S As String, Byval F As Long, hNL As Long) As Integer

Declare Function OSLockObject Lib "NNOTES" Alias "OSLockObject" _
( Byval H As Long) As Long

Declare Sub OSUnlockObject Lib "NNOTES" Alias "OSUnlockObject" _
( Byval H As Long)

Declare Function OSMemFree Lib "NNOTES" Alias "OSMemFree" _
( Byval Handle As Long) As Integer

Declare Function ReadInteger Lib "MSVCRT" Alias "memcpy" _
( N As Integer, Byval P As Long, Byval B As Long) As Long

Declare Function ReadString Lib "MSVCRT" Alias "memcpy" _
( Byval S As String, Byval P As Long, Byval B As Long) As Long

Sub Initialize
        Dim session As New NotesSession
 
        Dim x As String
        Dim m As String
        Dim p As Integer
        Dim I As Integer
        Dim n As Integer
        Dim hNL As Long
        Dim GroupCount List As Integer
        Dim a As String
        Dim abook As NotesDatabase
        Dim aview As NotesView
        Dim doc As NotesDocument
        On Error Goto oops
        Set abook = session.GetDatabase("", "names.nsf")
        Set aview = abook.GetView("People")
        Set doc = aview.GetFirstDocument
        Do Until doc Is Nothing
 
 
                a = doc.FullName(0) 
 
         ' Get Names List handle (fails on R4)
 
                'On Error Resume Next
                NSFBuildNamesList a$, 0, hNL
                'On Error Goto 0
                If hNL = 0 Then
                        Print "Failed"
                        Exit Sub
                End If
 
  ' Get memory pointer
                Dim pNL As Long
                pNL = OSLockObject(hNL)
 
  ' Get number of entries, skip to first entry
                ReadInteger n%, pNL, 2
                pNL = pNL + 14
 
  ' Read the entries
                For i% = 1 To n%
                        x$ = String$(256, " ")
                        ReadString x$, pNL, 256
                        p% = Instr(x$, Chr$(0))
                        pNL = pNL + p%
                        If Not p% = 0 Then x$ = Left$(x$, p% - 1)

  ' each group is listed in x$ in this loop

                Next
 
  ' Discard the Names List
                OSUnlockObject hNL
                OSMemFree hNL
                'Exit Do
                Set doc=aview.GetNextDocument(doc)
        Loop

Exit Sub


Can you keep multiple versions of Notes on the same system?

Yes. On an install of a new version, you should:
1) Put the \Notes directory in your PATH.
2) For major revisions (3.x -> 4.x -> 5.x, etc.), keep a separate copy of the \Notes\Data directory because the Notes internal database format changes between each version; new major versions will upgrade old database versions to the latest which can then no longer be read by the old versions. You can point to the appropriate data directory by editing your notes.ini file; you will only need one per major revision (NoteData.3, NoteData.4, etc.)
3) After the install, move the notes.ini file into the \Notes directory.
4) Before installing a new version, rename the directory of the old version to something else (e.g., \Notes to \Notes.463).
5) Install into the same non-renamed directory (e.g., \Notes), but before doing this, copy your desktop.dsk file into this directory so it can be upgraded if needed.

To use a specific version:
1) Make sure you are not running anything from \Notes (e.g., Notes Single Logon which is nsl.exe, the mail check in R5, the Notes client, etc.)
2) Rename the current \Notes directory to whatever version (e.g., \Notes to \Notes.463) it was.
3) Rename the directory with the version you want to \Notes (e.g., \Notes.50 to \Notes).
4) Start Notes.

You have to keep the same directory structure because in later versions of Notes, there is information in the registry related to OLE automation. If you use separate directories for each version, OLE automation may not function correctly.

With the caveat about OLE automation, you can run multiple versions simultaneously if you:
1) do not put the \Notes directory in your PATH
2) run the nlnotes.exe (or the appropriate executable for your platform be replacing the first character in the filename) instead of running notes.exe
From Olivér Zsigmond (Oliver_Zsigmond@lotus.com) comes this tip on how to run the R5 server locally with multiple clients:

Rename dirs of your existing versions of Notes R3, R4.x as described above.
Move your NOTES.INI into the appropriate NOTES.EXE dir.
Modify the Directory line in NOTES.INI to show the appropriate DATA dir.

Install Domino R5 to \lotus\domino
Install Notes R5 All Clients to \lotus\notes

Both directories will have their own NOTES.INI file and DATA dir.

Start Domino server and complete the setup.
Start any of the Notes clients (R3,R4 or R5) from its directory and you can use the local R5 server. You can stop the client and start any other one without stopping the server. The new rules are that you can start only one client and you can't start the client from \lotus\domino because if you stop this client, it will stop the Domino server as well.
Because of Windows Logo requirements, the \data directory structure in R6 is more confusing. There are some files in \lotus\notes\data underneath where you installed the main \lotus\notes executables, but there are also NSF files and the notes.ini file in "\winnt\profiles\<username>\local settings\application data\lotus\notes\data". You can change to a similiar structure as R3/R4/R5 by moving the files and then changing the Directory attribute in the notes.ini to point to the new directory.

In the registry, you should update the DATADIR value in the "HKEY_USERS\<userid>\Software\Lotus\Notes\Installer" key to point to the data directory you used so that the installer knows how to uninstall and update your current files.
In addition, the following two keys should point to the data directory:
"HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes\6.0\DataPath"
"HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes\DataPath"

Note that this will probably break R6's roaming user support. Installing multiple versions of Notes is something usually done by developers, so this should be a reasonable caveat.
Mike Kemp (MikeJKemp@aol.com) uses this technique for running multiple simultaneous versions on NT/Win2K:

So I could respond quickly to user's 'phone queries I had my desktop 'admin' workstation set up so I could run several Notes clients concurrently.� The OS had to be NT (or W2K) - definitely not W9x.� The set up is along the same lines as in your article, with the difference that the start-up shortcut preferences point to the appropriate nlnotes.exe (rather than the more usual notes.exe) similar to this:

for R4.5 client :-� C:\NotesR45\nlnotes.exe =D:\NotesR45\Data\notes.ini

for R4.6 client :-� C:\NotesR46\nlnotes.exe =D:\NotesR46\Data\notes.ini

for R5.x client (my main admin tool):- C:\R5Client\Notes.exe =D:\R5Client\Data\notes.ini.

and even (as an experiment):- C:\NotesR33\_lnotes.exe =D:\Notes33\Data\notes.ini.

Note that the R5 shortcut pointed to the Notes.exe and MUST be started first.

With this structure in place I could <Alt>+<Tab> between the various clients at will and so be able to 'talk my callers' through a problem quite rapidly.� I could also check the operation of a database development intended for the environment.

The only drawback was the occasional entire machine 'lock-up' if I tried to use the Admin console in more than one client at a time - but this did not affect the servers.

I have not had the opportunity yet to try out this procedure involving ND6.


How do you get rid of all the deletion stubs in a database?

All document deletion stubs in a database can be purged by selecting File/Database/Information/Replication and setting the cutoff date ahead two days. Once this is done, the deletion stubs are purged immediately.

NOTE: Depending upon the Notes platform, it may also be necessary to set the purge interval to one day as well as setting the cutoff date ahead. This is not required for all Notes platforms.


How can you have multiple users on one workstation?

Each user has to have a separate notes.ini file and desktop.dsk file. There is a freeware utility called SmartSwitcher that does all this for you and provides a nice user interface. It can be picked up by clicking [ftp] here. This only works for Notes 3.x

A few settings (like workspace textured background) are not preserved for Notes 4.x users in SmartSwitcher. There is a commercial utility named MultiUser Logon Utility from Rein&McBride that does handle Notes 4.x.

Another commercial utility that reads the ID files from a database is
SwitchID from Sollazzo Consulting.

You can also use location documents in Notes 4.x and higher. Important caveats: 1) users share the same desktop so one user can rearrange icons/bookmarks and totally confuse the other users, 2) they will get false "you have new mail" indications, and 3) the user ID files for all the users will be in one location.

Here are some tips from Laurence Wagner (lwagn2@dwp.ci.la.ca.us) on how to do this:


Do a normal install for the first user, then do the following:
1. Change the User Preferences
Select File / Tools / User Preferences from the menu.
In the Navigator panel, with icons labeled "Basics, International, Mail, and Ports", click on Basics.
There are four check boxes to the immediate right of the Basics icon. Select the box labeled "Prompt for location".
Now when Notes is re-started, it will prompt the user to select a named location document. The original location documents given with Notes are named for a variety of network connections that these users will not need to use, but do not delete them.

2. Copying the Notes ID files to the Workstation
Get these files from your Notes admin. These can go to the Notes\Data directory or a network drive, as long as it will be available to your users. Once on the workstation, each person should log in and reset their password from the default value. This can be done after the location documents are created for each person.

3. Add an action button, labeled "Make Location Doc", to the People view of the LADWP Name and Address Book. Switch to the user's ID file before you run this. The code for the button is as follows:

Sub Click(Source As Button)
  Dim session As New Notessession
  Dim notesdirectory As String
  notesdirectory = session.GetEnvironmentString( "Directory", True)
  Dim keyfilename As String
  keyfilename = session.GetEnvironmentString( "KeyFilename" , True)
  Dim whois As String, realwho As String
  Dim workspace As New NotesUIWorkspace
  Dim doc As NotesUIDocument
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.EditDocument(False)
  Dim item As NotesItem
  Dim first As String, last As String, mailserver As String, mailfile As String
  Dim mailserver1 As String, mailfile1 As String
  Dim short As String
  Dim short1 As String
  Dim udir As String
  Dim full As String
  Dim ppass As String
  Dim thisdb As NotesDatabase

  whois = session.CommonUserName
  realwho = session.UserName
  Set thisdb = session.CurrentDatabase
  Set uidoc = workspace.EditDocument(False)
  first = uidoc.FieldGetText("FirstName")
  last = uidoc.FieldGetText("LastName")
  short = uidoc.FieldGetText("ShortName")
  mailfile = uidoc.FieldGetText("MailFile")
  spaceposition = Instr(1,mailfile, "\")
  short = Mid( mailfile, spaceposition + 1)
  mailfile1 = "mail\\" + short
  mailserver = uidoc.FieldGetText("MailServer")
  If first <> "" Then
    full = first + " " + last
  Else
    full = last
  End If
  Call uidoc.Close
  Print "got Person data"

'  Build new rec
'
  Set uidoc = workspace.ComposeDocument ( "", "names.nsf", "Location" )
  Call uidoc.FieldSetText("Name",full)
  udir = notesdirectory
  short1 = keyfilename
  Call uidoc.FieldSetText("Userid", udir + "\" + short1)
  Call uidoc.FieldSetText("Domain","LADWP")
  Call uidoc.FieldSetText("DST","1")
  Call uidoc.FieldSetText("Enabled","0")
  Call uidoc.FieldSetText("NameLookupPref","2")
  Call uidoc.FieldSetText("ExhaustiveNameLookup","1")
  Call uidoc.FieldSetText("Images","0")
  Call uidoc.FieldSetText("LocationType","0")
  Call uidoc.FieldSetText("MailFile", mailfile)
  Call uidoc.FieldSetText("MailServer", mailserver)
  Call uidoc.FieldSetText("Source","*")
  Call uidoc.FieldSetText("TimeZone","8")
  Call uidoc.FieldSetText("WebRetriever","Netscape Navigator")
  Call uidoc.Save
  Call uidoc.Close
'
'     Add the mail database to the workspace
'
  If whois = full Then
    spaceposition = Instr(1, mailserver, "/")
    If spaceposition = 0 Then
      spaceposition = 30
    End If
    mailserver1 = Left$( mailserver, spaceposition - 1)
    Call workspace.AddDatabase( mailserver1 , mailfile1 )
    Messagebox "the mail database for: " & full & Chr(10)  & " has been added to the workspace, and " & Chr(10) & "Location
Document added to Address Book"
  Else
    Messagebox "Location Document for: " & full & " added to Personal Address Book"
  End If
End Sub

A company called DNI Systems makes a workstation sharing solution called Notes Profiler. It accomodates roaming users.

Note that this is no longer necessary as of Notes 6.01. Notes 6.01 supports roaming users so their Notes desktops go with them to each machine. It also supports multiuser installs of the Notes client on a single machine so each logged on user doesn't have to install their own separate copy of Notes and waste disk space.

Can you run console commands from a server program document?

From kanellopoulos@byte.gr who found it in the notes.net discussion:

This Win32 program is used in program docs to execute any console command on schedule such as:

  Tell http restart
  Show tasks

Example:

  Program name:     nconsole.exe
  Command line:     SERVER/ACME "tell smtpmta compact all"
  Server to run on: SERVER/ACME

- nConsole.exenconsole.exe

You also have to have the server name in the Administrator section of the server document in the name and address book.


What are .IIB files?

These files are generated by the Lotus Incremental Installer. They are backups of the files that the Incremental Installer changed. You can delete these files if you are satisfied with the incremental upgrade. If not, run the same Incremental Installer again and it will ask if you want to uninstall the upgrade.

Note: If you're running a CF incremental, do *not* delete the IIB files. When Lotus releases another normal incremental, it will try backing out the CF incremental by using the IIB files; if they don't exist, the incremental will fail.

How do you secure WebSphere
Since a version of WebSphere is bundled with R6, it seemed appropriate to include a FAQ on this. e-Pro Magazine had a good article describing how to secure WebSphere.

How do you use Smart Upgrade?
From Martin Huber:

For initial testing I would advise you to only use "Tools->Notes Smart Upgrade" for now.

To get it working, you need to:

1) Create a database for your Smart Upgrades using the Smart Upgrade Kit advanced template on the server
2) Add a database link to the Smart Upgrade database in the config document of your home server
3) Wait a few mins until it registers the change
4) Add a new kit document to the database with the following settings to upgrade from 6.0 to 6.0.1 (note the "Source" string has to exactly match):

**Basics**
Source version: Release 6.0
Operating system: Windows/32
Localization: English
Destination version: Release 6.0.1
x Restart Notes after upgrade (editor's note: this feature won't work reliably until you're doing the upgrade using a R6.0.2 client)

**Data**
Location of Upgrade Kit: either 'attached' or 'shared drive'
[Full path to upgrade kit: \\someserver\somepath\xxx.exe] (only if using shared drive)
Optional arguments: /S /v/qb+ (for silent install) (editor's note: this only works if the executable is named setup.exe as of R6.0.0 and R6.0.1)

**Admin notes**
Some text. (Don't leave this empty!)

**Administration**
Allowed users: */YourOrg

5) Save and enable the download kit
6) Set up the ACL of the database for reader access to everyone in your organization

Now you should be able to use the manual upgrade feature of your notes client (if you're on the right home server).

Can you replicate mail immediately when you get a new mail notification in the Notes client?
This feature was added to R6. Make sure your Location document's Mail Addressing field is set to "Local and Server". When the R6 client receives a new mail notification, it will automatically initiate a replication of the mail database to get the new mail.

How do you get the server to recognize changes to groups immediately?
From Daniel Nashed:
"show nlcache" gives you the current status of the NameLookup Cache
"show nlcache reset" reset the NameLookup Cache

Can you run SpamAssassin on a Notes server?
This only works on Win32 systems and requires the use of a Before Mail Arrives agent and a COM object so it may not be that scaleable:
http://www.projectlounge.com/QuickPlace/spamassassin/Main.nsf


Can you prevent Internet mail from being sent to groups?
You can use the RouterDisableMailToGroups setting in your notes.ini file to do this.

Thanks to Declan Lynch for posting these notes.ini variables from the anti-spam session at LSphere'04:

SMTPGreeting=Companyname SMTP server ready at %s (%s is the current date and time) (R5+)
SMTPnoVersionInRcvdHdr=1 (R5+)
SMTPErrorLimit=# where this is the number of malformed smtp commands before forcing a disconnect. (ND6.03+)
SMTPMaxForRecipients=# where this is the max number of recipients in any message (R5+) WARNING : This discloses the BCC list
SMTPMaxRecipientCount=# where this is the max number of RCPT commands that the smtp server will be accepted per session
RouterDisableMailToGroups=1 will stop internet mail being sent at ANY group in your NAB (ND6+)
SMTPDebugSearchAllDNSBLSites=1 will cause the Blacklist feature to search all sites to help you gather stats on the best DNSBLs (ND6+)

Can Domino prevent MS viruses from getting into user's mailboxes?
In Domino 6.x, you can define a Mail Rule in your Messaging Configuration that lets the server reject any SMTP mail that contains a specific filename or extension. In Domino 5.x, you had to use a pre-delivery agent to do this, but this was after the mail was accepted into the mail routing system.

How do you set up S/MIME?
There is a good article on Developerworks that describes the setup process and tradeoffs: "Lessons in secure messaging using Domino 6".

Why does a Mail Rule seem to keep running even after it's deleted?
In a user's mail file, they should be disabling a mail rule before deleting it. That's because the actual ruleset lives in the CalendarProfile document and you have to update this ruleset by using the enable/disable buttons in the mail rule view. To get rid of an old rule that is still running, add a new rule, then use the view buttons to enable/disable it. Then delete the rule and all rules should be disabled.

Can users recall messages they've sent?

Gregg Eldred provided the nice agent below to do this. Caveats are that the user must ask an administrator to run the agent and the administrators have to have access to everyone's mail file. A copy of the sent message must be selected for the agent to run on:

Sub Initialize
Code: Dim db As NotesDatabase, mailDb As NotesDatabase
Dim s As New NotesSession
Dim doc As NotesDocument
Dim dc As NotesDocumentcollection
Dim notesdbdir As New NotesDbDirectory("mailserver/ou")
Dim mailDoc As NotesDocument
Dim thisLog As NotesLog
counter = 0
'//evaluate the membership of the administrators group. If user does not have access, then exit the routine
eval$ ={@IsMember("Administrators";@UserNamesList)}
admin = Evaluate(eval$)
'//check security level of the person running the agent - admin level
only
If admin(0) = 0 Then
Msgbox "You do not have the required access to recall messages. Please contact your Lotus Administrator. Thank you", 0+16, "Error - Security Level"
Exit Sub
End If
'//script will error if the mailDoc is not set, so force the script to resume next on any error
On Error Goto errHandler
'//get a handle to the current database
Set db = s.CurrentDatabase
'//get the first database in the directory on the server.
Set mailDb = notesdbdir.GetFirstDatabase(DATABASE)
'//get the documented marked for removal
Set dc = db.UnprocessedDocuments
'//check to make sure that a message(s) has been selected for recall. If not, then exit sub
If dc.count = 0 Then
Msgbox "You have not selected any messages to recall. Please select the messages you wish to recall and run this agent again. Thank you.", 0+16, "Error - No Message Selected"
Exit Sub
End If
'//Due to server performance, get only one document at a time
Set doc = dc.GetFirstDocument
'//set the log file using some information from the document
Set thisLog = New NotesLog("Message Recall")
Call thisLog.OpenNotesLog("server/ou", "applog.nsf")
thisLog.LogActions = True
'//log brief information about the offending email for tracking purposes
Call thisLog.LogAction(" ********** RECALL STARTED ************* ")
Call thisLog.LogAction(db.title & " - " & doc.universalid)
'//check the database for the particular unid in question
While Not(mailDb Is Nothing)
'//if the filepath of the database has 'mail' in it, then it should be a mail file
If Instr(mailDb.FilePath,"mail") Then
'//in order to search by unid, you must open an instance of the mail file
Call mailDb.Open("", "")
'//Search for the document by unid
Set mailDoc = mailDb.GetDocumentByUNID(doc.UniversalID)
'//if the document matching is found, remove the
document
If Not(mailDoc Is Nothing) Then
Call mailDoc.Remove(True)
Call thisLog.LogAction(" -- document removed from db: " & mailDb.Title)
'//count the number of databases that we remove the document from, for verification purposes
counter = counter + 1
End If
End If
'//get the next database in the directory
Set mailDb = notesdbdir.GetNextDatabase
Wend
'//display message to the administrator
Msgbox "Recall Complete. Please review log file for validation. Thank you and have a great day, " & s.commonusername, 0+64, "Message Recall"
'//finish up the logging and then close the log file
Call thisLog.LogAction(" Agent Completed -- " & counter & " databases were accessed.")
Call thisLog.LogAction(" ********** RECALL COMPLETE ************* ")
Call thisLog.Close
errHandler:
Resume Next End Sub


Can you forward a copy of a user's mail and keep it in their mailbox?

You can use R6 Mail Rules in their mailbox, but the problem is that all the forwarded mail looks like it comes from you.

As an alternative, you can use this Before New Mail Arrives agent. However, it cannot include the Cc list directly; it has to be part of the mail message so a duplicate copy of the forwarded mail doesn't get sent to the original Cc list. This nice thing about this agent is that it retains the original "From" address so the user can reply to the sender directly.

Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim forward As NotesDocument
Dim forwardaddress As String
Dim rtitem As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator
' **** set to the address that you would like to forward mail to ****
forwardaddress = "test@test.com"
Set db = s.currentdatabase
Set doc = s.DocumentContext
Set forward = New NotesDocument(db)
Call doc.CopyAllItems(forward, True)
Set rtitem = forward.GetFirstItem( "Body" )
Dim newtext As String
'navigation element in order to place header in front of body text
Set rtnav = rtitem.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
'determines if this is an internal message or not
Dim nn As New NotesName(doc.GetItemValue("From")(0))
Dim cc As New NotesName(doc.GetItemValue("CopyTo")(0))
Dim sto As New NotesName(doc.GetItemValue("SendTo")(0))
' Set up a header that will be attached to the email which
' specifies additional info about the original email since we include the Cc list directly
Dim testcopy As String
If doc.GetItemValue("CopyTo")(0) = "" Then
testcopy = "no one."
Else
Forall x In doc.GetItemValue("CopyTo")
If testcopy = Null Then
testcopy = x
Else
testcopy = testcopy + x + ", "
End If
End Forall
End If
If nn.IsHierarchical Then 'if it is then get their internet address
If nn.Addr821 <> Null Then
'if they have one then use this as the from address
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + sto.Addr821 + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert
Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("From", nn.Addr821)
Call forward.Save( True, True )
Else
' otherwise if this is an internal message and the internet address of ' that user is not populated, use the agent signer's return address
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + sto.Addr821 + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert
Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("iNetFrom", nn.Addr821)
Call forward.Save( True, True )
End If
Else
'otherwise this came in from the internet, so just use the from address as the inetfrom
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + doc.GetItemValue("SendTo")(0) + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert
Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("iNetFrom", doc.GetItemValue("From")(0))
Call forward.Save( True, True )
End If
forward.Send False, forwardaddress
Call forward.RemovePermanently(True) End Sub


How Do You Set Up Failover for Outbound SMTP Mail?

In your server configuration document, there is a field for setting the relay host for messages leaving the Internet domain. If you put a comma separated value in there (can be IP addresses or hostnames), the SMTP router will try all the outbound relay hosts you specify when trying to send outbound SMTP mail.

Why is my Notes client having trouble replicating over satellite links?
There is a lot more latency on satellite links. Craig Wiseman suggested these parameters for your TCP/IP adapter that connects to your satellite modem:

TCP RECEIVE WINDOW : 224360
WINDOWS SCALING : YES
TIME STAMPING : NO
SELECTIVE AKS : YES
PATH MTU DISCOVERY : YES
BLACK HOLE DETECTION : NO
MAX DUPLICATE AKS : 3
TTL : 64
MTU : 900

You can use DrTCP to make these changes.


Can you find out how long views take to rebuild?
Here is some general logging info you can enable in your notes.ini. The first entry will log the start of each view rebuild by the updall task so you can calculate the time it took a view by comparing two messages:

; Show some log entries when the updall/update runs
LOG_UPDATE=2

; show the number of transactions
SHOW_PERFORMANCE=1

; Show logfile entries when semaphore waits time out
DEBUG_SHOW_TIMEOUT=1
; Show the thread ids
debug_threadid=1

; And show a semaphore wait log entry after ten seconds waiting.
debug_capture_timeout=10
debug_sem_timeout=10000


Can you have an Apache server handle Domino URLs on a different box?
You can use something called "reverse proxy" to map the Domino URLs to an internal machine:

http://www.apacheweek.com/features/reverseproxies


How do you enable folder references for a database?
You have to do this programmatically and via the convert task.
Programmatically, you have to enable the folder references property on the database. E.g.

Dim session as NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
db.FolderReferences = True

This enables Notes to track which folders documents are put into after you enable this flag. However, all the foldered documents before setting this flag will be missing their folder references. To determine which folders documents are in, you have to run this on the server console:

load convert -m <database>    
(R6 or R7)
or
load convert -e <database>    
(R5)


How do you get a list of inactive databases?

From Thomas Kennedy:

If you look in the server log there is a view called "Usage by Database" with Activity documents. There is one Activity doc per app on the server. In the activity doc there is a rich text field called "AllViewInfo"; this field stores the view names and the size of the view index, like this:

view1 tab number newline
view2 tab number newline

and so on. If you extract this information to another database, and there extract the text of the rich text field, and split it into an array based on newline, and then split each element of this array based on tab, you will have the name of each view and the size of the index.

Because Notes discards the view index after 45 days of disuses, this gives you a very simple and more or less accurate way of identifying unused apps. If, for example, 95% of the views have a size of zero you can flag that app for a closer look.

The rich text data is not perfectly consistent, so the call to split() should be in an error trap.

Sample code:

' **********************************************************
' Split the item's data into an array based on Newline.
' This gives us an array whose values are like:
'
' {viewname tab number; viewname tab number}
' **********************************************************
v1 = Split(activity_richtext.GetUnFormattedText, Chr$(13)&Chr$(10), -1,5)

total_views = 0
total_populated_views = 0

' **********************************************************
' Split each element of that array based on tab. This 
' gives us an array whose values are like:
' {viewname;number}
' **********************************************************
For c = 0 To Ubound(v1)
  v2 = Split(v1(c), Chr$(9), -1,5) 

  ' **********************************************************
  ' Some documents will contain "No views" or something
  ' similar in their rich text item. The resulting ubound will
  ' be 0, not 1. We step over these. The marker will be
  ' ACTIVITY_MARKER_UNKNOWN.
  ' **********************************************************
  If Ubound(v2) < 1 Then Goto NextView

  ' **********************************************************
  ' We keep track of two numbers: the number of views,
  ' and the number of non-zero view sizes. These tell us
  ' what percentage of the views have an index, and thus
  ' indirectly whether the db is in use or not.
  ' **********************************************************
  total_views = total_views + 1 

  ' **********************************************************
  ' Inconsistencies in the way the data is stored may
  ' result in a value that we cannot convert to a number,
  ' so this cast may raise an exception.
  ' **********************************************************
  On Error Resume Next
  tmp_double = Cdbl( v2(1) )
  On Error Goto 0

  ' **********************************************************
  ' If it does we just skip to the next view.
  ' **********************************************************
  If Err <> 0 Then
    Err = 0
    Goto NextView
  End If

  If tmp_double > 0 Then
    total_populated_views = total_populated_views+1
  End If

nextView:
Next c 

What events cause the user ID to be backed up into the recovery database?

These events will cause the Notes client, after a 5min idle period, to send an encrypted copy of the user's ID file into the user ID recovery database:
Accepting new Notes keys into the ID file
Accepting a name change into the ID file
Initiating a change request
Updating the recovery information
Inserting a document encryption key (NEK) into the ID file


What can I check if my server is running too slow?

These are a few resources you can check:

- The Domino Performance Cookbook
- The Domino Performance Redbook
- Domino Performance Best Practices
- Troubleshooting TCP/IP Issues
- if you are running a cluster, do "show stat replica.cluster*" and check your cluster queue (if it's too high, your network bandwidth is too low)


Does Domino Support Wildcard SSL Certificates?
Thanks to Joe Walters for putting up this detailed description of how to set this up:

Configuring a wildcard certificate with Domino is very similar to configuring a single-host SSL certificate.� So, most of the process below you'll already be familiar with if you've ever set up SSL on Domino.� Here's how I would configure a new wildcard certificate in my test environment.� I'll include some caveats and comments at the end, so save your questions. :-)

My scenario:

I have a Domino 7.0.x server, Kakadu/WashU, running on Windows Server 2003.� It's Program directory is C:\Lotus\Domino and it's Data directory is D:\Lotus\Domino\Data.� I want to configure an SSL certificate for Kakadu, but I know later, I'll be asked to configure SSL certificates on other Domino servers, so I opt to implement a wildcard certificate. �

To save some time and hassle later, I picked an unused local drive letter (V:) and mapped a drive to Kakadu's D: drive (from a windows cmd prompt, I type net use V: \\kakadu\d$). �

Creating a Key Ring File:

The first thing I need to do to configure any SSL certificate in Domino is create a key ring file.�

I open the Domino Server Certificate Administration (CERTSRV.NSF) database on Kakadu (at this point, you may have to escape out of the About Database document), then click on Create Key Ring.


The key ring file is used to store the certificates and it ultimately needs to reside in the Domino server's data directory.� (This is where my mapped drive helps me out a little.) �

In the Key Ring File Name: field, I enter the path to where I want my key ring file to reside (in my Domino server's data directory, via my locally mapped V: drive).

Next, I enter a password and confirm it.� (Document and secure this password somewhere.� Do this now.� If you're like me, you won't remember it five minutes from now.)

I then select the Key Size I want to use for my key ring.� There's no reason for me not to choose 1024 for a more secure encryption strength.

Everything's been normal SSL configuration to this point.� But now, in the Common Name field, I need to use the wildcard notation instead of the fully qualified domain name (FQDN) of my server, as I normally would.� My Domino server's FQDN is actually kakadu.wustl.edu, so the proper wildcard notation should be *.wustl.edu.

The rest of the fields (organization, Organizational Unit, City or Locality,� State or Province, and Country) should be filled in just as you would if you were configuring a single server SSL certificate.

When I've finished filling out this form, I click the Create Key Ring button at the bottom.


A dialog box pops up indicating I've successfully created my key ring file.� I click OK and at this point, if I were to go out to Kakadu's Domino data directory, I would see my .kyr file (wildcard1024.kyr).� I should also see a wildcard1024.sth file in the data directory.� The .kyr file is password-protected in a binary format (not encrypted).� The .sth file is the Stash file, and it stores the password to the .kyr file so the server can use it unattended.



Generating a CSR:

Now that I have a key ring file to store my certificates, I need to generate a CSR (Certificate Signing Request).� Still in certsrv.nsf, I now click on Create Certificate Request.

A Create Server Certificate Request form opens, and I confirm that the Key Ring File Name path includes the full path to the key ring file I created previously.� All of this auto-filled for me, so I just click the Create Certificate Request button.�

Now a Certificate Request Created dialog box will pop up.� Here you'll need to copy to the clipboard everything you see in the bottom window including the -----BEGIN NEW CERTIFICATE REQUEST----- text at the beginning and the -----END NEW CERTIFICATE REQUEST----- text at the end.� (I suggest you paste this into a text file for temporary safe keeping as well.� You can safely delete it once you've finished the whole process.)� Click OK once you've copied the certificate to the clipboard.



Acquire your Wildcard SSL Certificate from a Third-Party Certificate Authority:

Now that you have a CSR, you can go to a third-party SSL provider's website to get a wildcard certificate.� Each provider's process will be a little bit different, but they will all want four things from you.

1) You need to be the owner of the domain name for which you want to get the wildcard certificate, so be prepared to provide some type of proof to the third-party CA that you're authorized to request the certificate.

2) You'll also need to provide some type of proof that your organization is a legitimate one.

3) You'll need to have the CSR you generated a moment ago.

4) Lastly, you'll need to pay for the certificate.� If you have a credit card, preferably a company card, this is definitely the easiest way to go.� I've had to pay for certificates with a purchase order in the past and the delay was irritating.� In fact, some CAs may not accept anything but a credit card anyway.

In this example, I'm purchasing my wildcard certificate from Digicert, but the process is very similar between Verisign, Thawte, Digicert, and I imagine most other third-party CAs.

Installing the Wildcard Certificate into your Key Ring file:


Once you've finished purchasing your wildcard certificate, your CA will let you know how to retrieve your certificate.� (Typically, you'll create a login account to their website where you can retrieve them.) �

Depending on who you purchase your certificate from, the key ring file may or may not already have Trusted Root and Intermediate certificates installed.� So the best bet is to install the Trusted Root and Intermediate certificates, assuming they're not already there.� You'll want to install the Trusted Root certificate first, then any Intermediate certificates, and lastly, install your wildcard certificate into the key ring file.

I open the Domino Server Certificate Administration (CERTSRV.NSF) database on Kakadu, then click on Install Trusted Root Certificate into Key Ring.

In the Install Trusted Root Certificate form that opens, I make sure the path to my key ring file is correct (this should autofill for me).� A label is required, so I enter a label appropriate to the cert I'm installing.� I also select Clipboard for the certificate source, and paste the certificate into the form.� Lastly, I clicked the Merge Trusted Root Certificate into Key Ring button.


A confirmation window appears, which reads the certificate data and presents it in a human readable format.� Everything looks correct, so I click OK.

In this case, the Trusted Root certificate I just attempted to install was already in the key ring.� No problem.� I just move on to the install any other trusted root/intermediate certificates I may need.

Again, I select Install Trusted Root Certificate into Key Ring.


And again, I verify the path to my key ring file, enter an appropriate label, paste the certificate into the form, and click the Merge Trusted Root Certificate into Key Ring button


Again, a confirmation pop-up appears and everything looks fine.� I click OK.

This time, I see that I did not have this certificate in the key ring yet, so it's good that I did this.� Having this intermediate certificate installed completes the certificate chain from the trusted root CA, through the intermediate certificate, and then to my wildcard SSL certificate.

Now I'm finally� able to install my wildcard certificate into my key ring file.� This time, I choose Install Certificate into Key Ring.

Again, I verify the path to my key ring file.� This time, however, I don't need to enter a label.� I still select the Clipboard option, paste the certificate into the form, then click the Merge Certificate into Key Ring button.

A confirmation dialog appears, and it's important to verify everything's correct.� It all looks good, so I click OK.

WOOHOO!! I've merged a wildcard certificate into my key ring file! Click OK.

Now you can configure domino for SSL as you would before.� Configuring SSL via web configuration or internet site documents is no different with wildcard certs than single-server certs.� To use the wildcard certificate on a different server, I only need to copy my key ring file (wildcard1024.kyr) and a stash file (wildcard1024.sth) located in Kakadu's data directory to the data directory of another Domino server.

Additional Notes:

Because this is a wildcard certificate, you need to take precautions to keep the certificate secure.� Of course, you should be protecting your file system from inappropriate access anyway.
I chose to use the clipboard method to merge certificates into my key ring file.� The other option is to specify a file (e.g. TrustedRoot.crt, DigiCertCA.crt and your_domain_name.crt).� Both options work equally well.� This is a personal preference.
I chose to map a drive to my Domino server's data directory.� The reason I did this was to avoid having to later copy my key ring file (wildcard1024.kyr) and stash file (wildcard1024.sth) up to my Domino server.� Again, a personal preference thing.� If you don't have a windows server, you could possibly mount a samba share, or just do everything with your local Notes client and copy everything up when you're done.� Personal preference again.
Now that I have a wildcard certificate, I'll store both the .kyr and .sth files in a highly secured database in Notes for safe keeping.� I also document when the certificate will expire in a central change managment database, then add a reminder on my personal calendar to send me a reminder a month or two prior to the expiration date, so I don't have any expiration surprises.
Lastly, the gobbledy gook text above for the certificates is not legit.� It's fictitious, but I think the screen shots are a fair representation of the process you'll encounter if you choose to configure a wildcard certificate in Domino.
An extra word of caution:
Depending on your browser, Wildcard certificates may work at only one domain level only.� For instance with my *.wustl.edu certificate, I can secure any website whose FQDN is in the format of domainlevel3.wustl.edu (e.g. kakadu.wustl.edu, dipperu.wustl.edu, etc.).� Regardless of the browser, these domain names will all have a valid certificate chain.� Things get trickier if I try to secure a website whose FQDN is in the format of domainlevel4.domainlevel3.wustl.edu (for instance, www.kakadu.wustl.edu).� www. is now a fourth level domain name, and my wildcard is specifically registered as *.wustl.edu, not *.*.wustl.edu.� Mind you, the last I checked, Firefox, Opera, and Mozilla had no problems applying a wildcard certificate to multiple levels in this way, but Microsoft IE and Safari throw warnings to the end user when they encounter this.

How Do You Rebuild Busytime?

The cleanest way to do this is to shut down the server and delete busytime.nsf and let the server rebuild this if your busytime database is corrupted. If you have a clustered setup, you have to shut down the servers in your cluster and delete the clubusy.nsf DB.

An alternative way that may not require server reboots:
- shut down the calconn, sched, and rnrmgr tasks
- delete all documents in the busytime.nsf or clubusy.nsf DBs or just delete the DB after a "dbcache flush"
- restart the calconn, sched, and rnrmgr tasks
- instead of restarting the tasks, you may be able to do "tell sched validate" and "tell rnrmgr validate" from the console


How Do You Fix the "Error connecting to server " Error?

The Domino server when it has multiple network cards, sometimes doesn't know how to contact itself and you get messages of the form "Error connecting to server <itself>: Remote system no longer responding". Even though DNS has the IP address for the server, Domino sometimes needs this IP address put in the local hosts file directly. On Windows, this is in the \windows\system32\drivers\etc directory.


Does "Optimize document table map" Cause View Index Corruption?

This is a known issue that happens with workflow applications that change forms for the documents as the documents go through the workflow. As long as your database does not do this, you can use this to get faster view performance. This is documented well on Nathan Freeman's Blog.

Lotus knows about this and won't fix it until they hear enough complaints from customers, so if you have a maintenance plan and want to use up one of your support tickets, feel free to do so :-)


Why do I get the "Maximum allowable documents exceeded for a temporary index" in the Notes Log?

Usually, an agent has a document filter criteria that is causing a temporary full text index to be created.
Simplify the filtering criteria or full text index the database to take the load off your server.

You can work around the limit of 5000 documents by adding (as of Notes 6) this:

  TEMP_INDEX_MAX_DOC=<
number> 

into your server's notes.ini but this isn't recommended because it will increase the load on your server.


IBM Redbooks

IBM redbooks are documents written by technical specialists within IBM. The quality of the technical information is generally very good. This is a list of the available publications related to Notes:

* Developing Applications with Lotus Notes Release 4, IBM form number SG24-4618-00
* LotusScript for Visual Basic Programmers, IBM form number SG24-4856-00, Lotus part number 12498
* Secrets to Running Lotus Notes: The Decisions No One Tells You How to Make, IBM form number SG24-4875-00, Lotus part number AA0424
* Lotus Notes Release 4 in a Multiplatform Environment, IBM form number SG24-4649-00
* IBM PC Server and Lotus Notes Integration Guide, IBM form number SG24-4857-00
*
Lotus Notes on AIX Systems Installation: Customization and Administration, IBM form number SG24-4694-00
* Using ADSM to Back Up Lotus Notes, IBM form number SG24-4534-00

You can order these redbooks from the Redbook Web Site.


Helpful Non-Notes Books

You can order any of these books from Amazon Books, who will give you a 20% discount on them. All you have to do is click on the ISBN number of the book in the tables below.

Search Amazon for more books:

Title
Author
Publisher
ISBN
Reviews

Enterprise.Com
Jeff Papows Perseus Books 0738200646 Ken Yee
Javascript : The Definitive Guide David Flanagan O'Reilly & Associates 1565923928
Java Servlet Programming Jason Hunter, William Crawford, Paula Ferguson O'Reilly & Associates 156592391X
Dynamic HTML : The Definitive Reference Danny Goodman O'Reilly & Associates 1565924940


Reviews are still needed.

If you've read a good Notes book lately, [email] let the FAQ maintainer know how you liked it.


Lotus Notes Magazines

The View, (800)810-1800 or (617)969-6666, $295/yr. Click [email] here to send a mail message to The View.

Lotus Notes & Domino Advisor, (800)336-6060 or (619)483-9851, $69/yr. Click [email] here to send a mail message to the Lotus Notes Advisor.

Lotus eBusiness Magazine (an on-line magazine)

Lotus Solutions Now! is a free publication on Lotus products published by Lotus.

Virtual Workgroups, (800)-227-1234, $40/yr. Not strictly a Notes magazine, but a good number of their articles describe how companies are using Notes.

netConnect, 011-44-171-221-7178, $225/yr for the printed version. This is a UK Groupware magazine with some articles on Lotus Notes. You can also [email] email them for additional info.

Group Computing, (415)348-0579, free to qualified individuals. This is a magazine that covers Notes and other groupware tools (including web based tools). [email] Contact them for more information.

Rupert's Lotus Business Week (Formerly Lotus eNews), free. A weekly email newsletter covering the business issues behind Lotus mail, groupware and web products. To subscribe, send email to [email] rupert.b@virgin.net.

Domino Power Magazine is a free monthly journal with weekly tips and daily Notes and Domino-related news.


How do you replace the "No Documents Found" message in an empty view?

In the $$ViewTemplate, count the elements in the view using @Elements(@DbColumn). This will get the number of documents in the view. You can then use this in the paragraph hide-when for the embedded view to hide it. In another paragraph, you can use the opposite of this formula to unhide a custom message or passthrough HTML.


Can you set Notes fields from JavaScript?

On the browser the Notes fields are rendered as objects associated with the form and are accessible via JavaScript. E.g. document.forms[0].NotesField.value = "hello" would set a notes text field named "NotesField" to the value "hello".
RichText, checkboxes and radio buttons are handled as array objects, so they must be indexed (e.g. NotesField[0]). You set different properties based on the field type ( .value=, .text=, .checked=true, etc.).


How do you remove Domino's default submit button?

Create a button hotspot on the form. On a separate line above it , put "<!--" and add a line below it with "//-->" using the HTML paragraph style. This will comment out the Domino button on the browser.

Another way to get rid of the Domino Submit button is to create a hotspot button on the form but do not assign a name or any code to it. It will not appear when you compose the document from a browser.

In R4.6/R5/R6, you can also turn on "Use JavaScript when generating pages" in Database Properties to disable automatic submit button generation. This setting may change the behavior of your other forms.

And for your amusement and all the other variations on this, check out the How To Hide A Submit Button web site :-)


Can you display a text field as a TEXTAREA?

From Howard Katz (HKatz@FocusedManagement.com):

Simply code your text field as "Allow multi-values", then on the Options tab, check "New line" for "Separate values when user enters" and "Display separate values with". This plain text field will then be displayed as a TEXTAREA. You can set the HTML attributes of the field to adjust the size of the TEXTAREA.


From Justin Freeman:
Note that you'll need separate web and Notes forms to do this: Add some passthru HTML text where you want the textarea to show up:

Then create a hidden computed field at the bottom of the page. Set the value to "comments" (the same name as the field).


How do you add a Javascript button which validates the form and then submits it?

Your checkForm function should have the code to validate as well as submit. Your button should be of the type "button" and not submit. If the validation fails make an early exit from the function.

Add the following code in the $$HTMLHead field:

"<SCRIPT LANGUAGE=\"JavaScript\"> 
function checkForm() {
  if (document.forms[0].Name.value == \"\") {
      alert(\"You must enter your name\");
      return false;
  }
  document.forms[0].submit();
  return true;
}
</script>"

Add this code for a submit button as passthrough HTML or with the HTML style:

  <INPUT TYPE="Button" VALUE="Submit" onClick="checkForm(0)">

Now that you've added a special button, you'll have to remove the default one that Domino generates via the FAQ on how to remove the submit button.


How do you display a list of response docs on the parent document?

You can display a list of response documents on a parent document on the web by using this simple technique:

1) create a view of your response documents which is categorized by the $REF field
2) embed this view in the form for the parent document, but use the single category feature with the formula:
@Text(@DocumentUniqueID)

This also works for Notes applications.


How do you get rid of the ecblank.gif in generated HTML?
Unfortunately, there is no easy workaround for this.

For Embedded Outlines, Brad Nelson suggested using this code in your JSHeader and calling it from the onLoad event:

function fixecblank() {
  lg = document.images.length;
  for (x = 0; x < lg; x++) {
    isrc = document.images[x].src;
    i = isrc.indexOf("ecblank");
    if (i != -1) {
      if ((document.images[x].width==20) || (document.images[x].width==16)) {
        document.images[x].width=0;
      }
    }
  }
}

but it only works for browsers which support modifying the size of graphics on the fly. This includes MSIE and Mozilla, but not Netscape 4.x.

For tables, you can get rid of it by turning off fixed width tables.

For views, turning off Show Response Docs in a Hierarchy helps get rid of it. The only other way to get rid of ecblank.gif is to create the HTML for views yourself by turning on the Treat View Contents As HTML property.

How do you Single-Sign On (SSO) if you use the JSP Tag Library?
In the tags, you can set the user attribute to "*webuser" and the Domino JSP Tag Library will take care of SSO automatically if you have SSO set up properly.

How do you switch tabs in tabbed tables?

Create a programmable table (enable Switch Rows Programmatically) and name it "MyTable".
Go to each row of your table and name it in the Row Tags part of the properties; name them "Tab1", "Tab2", etc. for each of the "tabs".
Create an editable text field named "$MyTable" and hide this field from web browsers.
Enable "Generate HTML for All Fields" for the form.
You can then add clickable form actions to the form that do:
@Command([ViewRefreshFields]);
@SetField("$MyTable";"Tab2");
@Command([RefreshHideFormulas])
and Domino will generate the appropriate JavaScript for you.


You should also be able to do this using pure JavaScript by doing:
document.forms[0].$Mytable.value="tab1";
document.forms[0]._doClick('$Refresh', this, null);

If you want to jump to a specific spot on the form, add an Anchor via passthru HTML that looks like this:
<a name=MyAnchor></a>
then call the _doClick function like this:
document.forms[0]._doClick('$Refresh', this, '_self', '#MyAnchor');

Some of this is documented in Lotus Technote #173543 and there is a sample in the LDD Sandbox.


How do you handle "Allow Values Not In List" dialogs on the web?
You'll have to remove the checkbox for Allow New Values for dialog fields so the choices show up on the web.

If you don't want to use JavaScript, you can add an "Other" field (plain text input field), then in the input translation formula for the main dialog field, append this Other field if it is not empty.

If you can use JavaScript (thanks to Michael Holmstrom):
- add a "var frm;" to the forms JS Header-event
- add a "frm=window.document.forms[0];" to the forms onLoad-event
- add a button "New value" with the following JS-code:

var response= prompt("Please add your new value",'');

if (response !=null) {
var i=frm.yourField.length;
frm.yourField.length++;
frm.yourField.options[i].value=response;
frm.yourField.options[i].text=response;
frm.yourField.options[i].selected = true; }


How do you get the relative path to the database for web URLs?

You can use:
nsfpath := @ReplaceSubstring(@Subset(@DbName; -1); "\\"; "/");

In R6+, you can just use @WebDbName.


Can You Do AJAX Applications with Domino?
Richard Schwartz has created a good collections of examples of this (including a link to a nice Name Picker example):

http://www.rhs.com/poweroftheschwartz/htdocs/LotusDominoAjax.htm


How do you get colored tabs in a tabbed table?
From Alan Lepofsky:

Each tab's color is the same as the background color for each row. However, you may not want the contents of each tab to have the background colour, so what I do is insert another 1*1 table with a white background, and fit the margins to 1% and 99%.

From Ben Langhinrichs:

Set the tabs to different colors (make sure there is only one column), and set all the cell borders to 0. Next, inside each tab, create a nested table which has a background color of white. A nice little touch I like to do is to have the cell borders on for the inside table, but change the cell border color to that of the tab.

Can You Run PHP Pages on a Domino Server?
You can install Apache with PHP and get them to run site by side on the same server. Mike Golding has written a nice article on how to do this.

How do you make a database open a form by default from the web?

Thanks to Carl Tyler:

Create a Navigator, call it WebNavigation it can be totally empty, as it doesn't really get used.
Create a form with the contents you want called $$NavigatorTemplateDefault
Now set the web launch options for the database to open the navigator WebNavigation and it will use the form $$NavigatorTemplateDefault


Computer Based Training

The following companies make Lotus Notes CBT courseware:
* Self Test Software (770) 971-8940
* Lotus (800)782-7876
* CBT Systems
* ReCor
* Professor 3T (end-user training)
* Headlight.com resells a few Notes courses

* TLCC's R5 Developer courses including web development, Java, LotusScript and JavaScript (free demo course available)
* TLCC's User courses for Release 5 and 6 (free demo course available)
* Get re-certified as a Release 6 CLP with TLCC's Update course
* TLCC's Notes Domino 6 courses
* TLCC's Domino Admin 6 courses cover setup of Domino and find tuning the Domino infrastructure
* Learn WebSphere and Java development with TLCC's WebSphere curriculum
* TLCC has Notes/Domino 7 courses for developers and administrators; they cover using DB2 with Domino


Virtual Classes via the Internet

Virtual Training Center
Distance learning courses for Notes users, developers, and administrators. Courses available for R4, R5, R6, R7, Notes and Domino development, LotusScript, Websphere, Java, and JavaScript. Try a free demonstration course at TLCC's web site.

Ives Development (the makers of TeamStudio) offer a web-based best practices training course for Lotus Notes and Domino developers called "TeamStudio LifeCycle".


Lotus Education Helpline
The Lotus Education Helpline has an Exam Guide for Lotus Notes; the number is (800)346-6409. Lotus Fax Support also has sample exam questions at 617-253-9150.

Notes Utilities

John Buckman's Lotus Notes Phone Dialer
[ftp] Alert! New Document Notifier
PutNote and GetNote


Notes Related Programs or Information

* [ftp] The LNOTES-L Archive
* [ftp] OS/2 Netware Requester Software
* [ftp] Lotus Internet Cookbook (.NSF format)
* [ftp] Notes Database Templates from Lotus
* [ftp] Lotus Notes Mobile Survival Kit


OfficeVision and SNADS

DGA Ltd.
has a set of tools for migration and co-existence of SNADS-compatible mail systems, OfficeVision and DisplayWrite.


PalmPilot

GlobalWare has a product called Pylon Conduit which does C&S and email sync w/ the PalmPilot. They also have a product called Pylon Pro that can even convert some Notes applications to run on the PalmPilot.

Puma Technology has IntelliSync.

Lotus has EasySync but the other products have more features.

Cadenza from CommonTime can synchronize mail, calendar, and contact info between Notes and a PalmOS device.


FAX

There are quite a few FAX gateways for Notes/Domino. All of these allow a user to e-mail a document to a FAX number.

Lotus' Domino Fax Server
Extracomm's ExtraFax
GFI Communication's Faxmaker for SMTP
Biscom's Fax for Notes
OMTOOL's Fax Sr.
Softlinx' Replix dominoFAX
V-Systems' VSI-FAX
Captaris' RightFAX
Redrock's FaxNow!


POP3

POP3Fido from KEY Enterprise Solutions is an integrated server task that delivers mail to Notes users from POP3 mailboxes. A 45 day trial version is available.

Pytheas' MailGate is a standalone POP3/SMTP gateway that works w/ Notes and Exchange.


Migration Tools

cc:Mail (including DB8 support)
Creative Business Solutions has a cc:Mail migration tool that is more updated than Lotus'.
Lotus' Migration Tools now support DB8.

Outlook
Binary Tree has a tool which migrates mail, folder structure, appointments and meetings (including invitees and attendees), tasks, and notes.

Exchange
OpenOne has a tool called Direct-TO-1 that lets email be migrated between Notes, Exchange, and a few other email systems.


MS Exchange <-> Lotus Notes

Linkage's Exchange-Notes Connector synchronizes directories, databases, and lets users send mail to each other while preserving attachments and rich-text formatting. Microsoft has bought Linkage; they bundle it for free with Exchange 5.5 and above.

MESA's JumpStart currently has does MS Exchange public folder to Notes database synchronization. They plan to have application and mail synchronization in the future.

Casahl's RA.GroupwareLink synchronizes Notes databases and MS Exchange folders.

Binary Tree's MailPort for MS Exchange migrates, mail, C&S schedules, and contacts to Notes.


Windows CE/Pocket PC/Windows Mobile

Cadenza from CommonTime can synchronize mail, calendar, and contact info between Notes and a WinCE/PPC/WM device; their mForms product also lets you do custom form application on this platform.


Notes <-> Rex Organizer

A freeware utility is provided by MorphaSys to let you sync your Notes address book and contact information and your most recent email with your Rex Organizer.


Outlook to Domino
Microsoft has released a free Outlook 2002/2003 connector so it can be used with Domino 5.x/6.x servers. It also lets you access your calendar, address book, and to-do list.

Lotus' Domino Access for MS Outlook lets you also use Outlook 2000 and replicate your mail onto your system.


LNotes-L

NOTE: this mailing list is dead as of 4/15/2007


The LNotes-L mailing list is maintained by [email] Joe Ashkar. It is a Listserver based email list for Notes programmers and administrators.

Contacting the Administrator
The administrator is Joe Ashkar ([email] lnotes-l@ashcom.net). Email him w/ any administration problems.

Subscribing
Send a message to [email] listproc@ozzie.notesnic.net. In the body of the letter, enter SUBSCRIBE LNOTES-L <your-name>. You will then be automatically added to the list.
To subscribe an address other than the one you are sending from, send a message to
[email] lnotes-l-mgr@ozzie.notesnic.net. In the body of the letter, enter SUBSCRIBE LNOTES-L ADDRESS. Replace ADDRESS with the address to send messages to. Approval generally occurrs within one day.

Unsubscribing
Send a message to [email] listproc@ozzie.notesnic.net. In the body of the letter, enter SIGNOFF LNOTES-L. You will then be deleted from the list.
To unsubscribe an address other than the one you are sending from, send a message to [email] lnotes-l-mgr@ozzie.notesnic.net. In the body of the letter, enter UNSUBSCRIBE LNOTES-L ADDRESS. Replace ADDRESS with the address you wish to unsubscribe. Approval generally occurrs within one day.

Sending Mail to the Mailing List
Address your message to [email] lnotes-l@ozzie.notesnic.net. Write your message and send it. It will be automatically distributed to the members of the list.
Please make sure that you don't use Return Receipt Requested or Carbon Copy back to the list!

Temporarily Shutting Off Mail Delivery
If you don't want to receive messages for an extended period of time (e.g., you go on vacation), but want to reserve your place in the queue, send a message to [email] listproc@ozzie.notesnic.net with a body of SET LNOTES-L MAIL POSTPONE. When you return, send a message to [email] listproc@ozzie.notesnic.net with a body of SET LNOTES-L MAIL ACK.

Getting All Messages from a Specific Day
Send a message to [email] listproc@ozzie.notesnic.net with a body of GET LNOTES-L <yymmdd>.

Searching for a Specific Topic
Send a message to [email] listproc@ozzie.notesnic.net with a body of SEARCH LNOTES-L <topic>.

Threaded Archives
Turtle's Weightless Dog site archives the list.
Connectria archives the list.


DominoLinux

DominoLinux is an open, unmoderated Internet mailing list about running the Lotus Domino Server on Linux.

Domino for Linux is an important development for the Domino community. Lotus's impending release of Domino for the popular Open Source platform is sure to introduce many people to Linux, as well as give existing Linux users access to a robust and scalable application server.

DominoLinux will be very focused on using Domino on the Linux operating system, so general questions about Domino and the Lotus Notes client are probably handled on the general Notes/Domino lists such as Domino-L (see http://www.nipltd.com/domino-l.htm) and LNOTES-L.

Archives of the list and other information is available at http://www.nipltd.com/dominolinux.htm

To join DominoLinux, send an email to

  join-dominolinux@lyris.nipltd.com

The content of your email is not important.

Mail to the list itself should be sent to dominolinux@lyris.nipltd.com

For assistance etc. please mail owner-dominolinux@lyris.nipltd.com


Oklahoma State Notes-L

Note: this mailing list is dead as of 4/15/2007

This is a Listserver mailing list that is not quite as popular as LNOTES-L, but it is nearly always operational.

Subscribing
To subscribe, send a mail message to:
LISTSERV@LISTSERV.OKSTATE.EDU.
Leave the subject line blank, and include on the first line of the message:
SUB NOTES-L first_name last_name

Unsubscribing
To unsubscribe, send the command UNSUBSCRIBE NOTES-L in e-mail to LISTSERV@listserv.okstate.edu.

Posting Articles
Send all articles to NOTES-L@listserv.okstate.edu.

Digest Mode
It is possible to receive the contents of this list as a "digest", a periodic collection of articles from the list traffic. After receiving your subscription confirmation, send the command SET NOTES-L DIGEST to
LISTSERV@listserv.okstate.edu.

Administrative Requests
Send all other list-related commands to LISTSERV@listserv.okstate.edu. For assistance, send the command HELP.
The list owners are: [email] James Alexander and [email] Konrad Brandemuhl.

Archives
This list has a threaded archive accessible by web browsers.


NotesMac

NOTESMTA is an open, unmoderated Internet mailing list for users and administrators of Macs running Lotus Notes/Domino.


Archives
Archives of the list, a web interface to the list server, and other information is available at http://lists.nipltd.com/cgi-bin/lyris.pl?enter=notesmac


Subscribing
To subscribe to NOTESMTA-L, send a regular email message to:

  lyris@lyris.nipltd.com

and in the body of the note, type:
  subscribe notesmac <your name>


Unsubscribing
To unsubscribe from the list, send a message to lyris@lyris.nipltd.com with the body "unsubscribe notesmac" (without the quotes).


Posting
To post to the list, send a message to notesmac@lyris.nipltd.com.


Oklahoma State Domino-L

Subscribing
Send an email message with "subscribe DOMINO-L" in the body to LISTSERV@LISTSERV.OKSTATE.EDU.

Unsubscribing
Send an email message with "signoff DOMINO-L" in the body to LISTSERV@LISTSERV.OKSTATE.EDU.

Sending messages to the list
Send mail to DOMINO-L@LISTSERV.OKSTATE.EDU.

Archives
This list has a threaded archive for access by web browsers.


NotesMTA-L

NOTESMTA-L is an open, unmoderated Internet mailing list for administrators of MTAs and Mail gateways between Lotus Notes/Domino and other mail systems. The discussion focusses on the issues surrounding connecting Notes/Domino to other mail systems (for example the Internet, X.400, cc:Mail) using MTAs and mail gateways. Typical topics are the choice, configuration, and use of these gateways, as well as problems created by the interaction of different mailing systems.


Archives
Archives of the list, a web interface to the list server, and other information is available at http://www.nipltd.com/notesmta-l.htm


Subscribing
To subscribe to NOTESMTA-L, send a regular email message to:

  lyris@lyris.nipltd.com

and in the body of the note, type:
  subscribe notesmta-l <your name>


Unsubscribing
To unsubscribe from the list, send a message to lyris@lyris.nipltd.com with the body "UNSUBSCRIBE NOTESMTA-L" (without the quotes).


Posting
To post to the list, send a message to notesmta-l@lyris.nipltd.com.


Portugese Notes Users Mailing List
To subscribe: "lotusnotes-br-subscribe@yahoogrupos.com.br"

David Stephens' Lotus Product/Event News

This is a Lotus support person that puts out great newsletters to keep his customers in touch with various Lotus info:
Send an e-mail to david_stephens@us.ibm.com with the subject line "Subscribe Lotus Product and Event News" (remove the quotes).

LNotes-J
This mailing list for Japanese Notes users. You can subscribe here:
http://www.iij-mc.co.jp/MLOnline/IIJ/98/lnotes-j.html

And there are archives here:
http://www.uisystem.co.jp/


Yahoo LNotes-L Group
This list is a replacement for the recently deceased LNOTES-L mailing list:

http://tech.groups.yahoo.com/group/lnotes-l-new/


Domino on iSeries (AS/400)
This is the Lotus Domino on the iSeries / AS400 (Domino400) mailing list
To post a message email: Domino400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/domino400
or email: Domino400-request@midrange.com
Before posting, please take a moment to review the archives at http://archive.midrange.com/domino400.

LNotes-L on Yahoo

Subscribing
You can get more info on the web site for this user group:
http://tech.groups.yahoo.com/group/lnotes-l-new/


Where can I find info on Mac-specific (not Notes-related) problems?

Check the following WEB sites:

* The Macintosh Resource Page
* The MacInTouch Home Page
* The Cult of Macintosh
* The EvangeList Web Site


If those don't have an answer to your Mac questions, they have links to numerous other sites for software downloads and other software and hardware questions. In addition, there is the I/O MUG - Internet ONLY Macintosh User's Group mailing list. To subscribe, send
SUBscribe IO-MUG <full name>
to
LISTSERV@UTARLVM1.UTA.EDU


What is a good entry-level AS/400 system?

You should get an AS/400 with at least a 200 CPW. A good entry-level system is the 170 with the 2164 processor. Domino does not run very well on a 150 or the smaller 170 model.

IBM has an AS/400 Domino Sizing site to help you decide.


Can you run the Notes Client on Linux?

Peter Leugner figured out to run the Notes 7.01 client on WINE:
- Get the latest wine from http://www.winehq.com (Version 0.9.19)
- Run the install: wine whatevertheinstalliscalled.exe
- Copy oleacc.dll and oleaccrc.dll from an existing windows to ~/.wine/drive_c/windows/system32 (depending on your settings this could be in windows/system, just copy them in both to be safe). Without this, you can't edit the preferences.
- Edit notes.ini and append the line
DisableUniscribe=1
This gets rid of a bunch of errormessages, I don't know, what it actually does.
- Start notes:
WINEDLLOVERRIDES="oleacc=n" ; wine "C:\Program Files\lotus\notes\nlnotes.exe"

There's a WINE wiki page on how to run the Win32 Notes client on Linux.


WINE (a windows emulator for Linux) has gotten good enough that it will run the R5 Notes client. Phil Colbourn (pcolbourn@argus.net.au) posted this helpful guide to getting it working:
* Download and install Codeweavers Wine rpm. I used codeweavers-wine-20010112-1.i386.rpm

* If you are mounting a dos partition, setup fstab and mount it. My /etc/fstab entry for my FAT32 partition is:

/dev/hda6 /mnt/e vfat noauto,owner,user 0 0

* Run winesetup Programs-System-Wine Config under gnome. I set these options:
- Look & feel to Win95
- Window Mode to Managed
- Drive E HD /mnt/e (my FAT32 partition)
- Drive H network ${HOME}
- Drive Z network / to have access to the file system
- I added E:\lotus\notes;E:\lotus\notes\data to the Path
I'm using a Compaq Armada E500. I has a lucent winmodem (for the money I expected a self-contained modem). Fortunately a linmodem driver is available. It creates a /dev/ttyLT0 device. In the ports section I set this as a Coms port, but I have not tested it yet. I also have a network HP 8000 printer set as lp and lp4 (for printing 4 pages per page, full duplex)

My ~/.wine/config file is listed here:

WINE REGISTRY Version 2
;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config

;;
;; MS-DOS drives configuration
;;
;; Each section has the following format:
;; [Drive X]
;; Path=xxx (Unix path for drive root)
;; Type=xxx (supported types are 'floppy', 'hd', 'cdrom' and 'network')
;; Label=xxx (drive label, at most 11 characters)
;; Serial=xxx (serial number, 8 characters hexadecimal number)
;; Filesystem=xxx (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
;; This is the FS Wine is supposed to emulate on a certain
;; directory structure.
;; Recommended:
;; - "win95" for ext2fs, VFAT and FAT32
;; - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
;; DON'T use "unix" unless you intend to port programs using Winelib !
;; Device=/dev/xx (only if you want to allow raw device access)
;;

[Drive A]
"Type" = "floppy"
"Path" = "/mnt/floppy"
"Label" = "/mnt/floppy"
"Device" = "/dev/fd0"

[Drive C]
"Path" = "/home/pc901725/.wine/fake_windows"
"Type" = "hd"
"Label" = "/home/pc901725/.wine/fake_windows"
"Filesystem" = "win95"

[Drive E]
"Type" = "hd"
"Path" = "/mnt/e"
"Label" = "/mnt/e"
"FS" = "win95"

[Drive Z]
"Type" = "network"
"Path" = "/"
"Label" = "Root"
"FS" = "win95"

[wine]
"Windows" = "C:\\Windows"
"System" = "C:\\Windows\\system"
"Path" = 
"C:\\Windows;C:\\Windows\\system;e:\\lotus\\notes;e:\\lotus\\notes\\data;C:\\Temp"
"Temp" = "C:\\Temp"
"GraphicsDriver" = "x11drv"
; Wine doesn't pass directory symlinks to Windows programs by default.
; Enabling this may crash some programs that do recursive lookups of a whole
; subdir tree in case of a symlink pointing back to itself.
;ShowDirSymlinks=1
"ShellLinker" = "wineshelllink"

[DllDefaults]
"DefaultLoadOrder" = "builtin, so, native"

[DllOverrides]
"kernel32" = "builtin"
"gdi32" = "builtin"
"user32" = "builtin"
"krnl386" = "builtin"
"gdi" = "builtin"
"user" = "builtin"
"toolhelp" = "builtin"
"comdlg32" = "builtin"
"commdlg" = "builtin"
"version" = "builtin"
"ver" = "builtin"
"shell32" = "builtin"
"shell" = "builtin"
"shlwapi" = "builtin"
"lz32" = "builtin"
"lzexpand" = "builtin"
"commctrl" = "builtin"
"comctl32" = "builtin"
"wsock32" = "builtin"
"winsock" = "builtin"
"advapi32" = "builtin"
"crtdll" = "builtin"
"ntdll" = "builtin"
"mpr" = "builtin"
"winspool.drv" = "builtin"
"ddraw" = "builtin"
"dinput" = "builtin"
"dsound" = "builtin"
"winmm" = "builtin"
"mmsystem" = "builtin"
"msvideo" = "builtin"
"msvfw32" = "builtin"
"mcicda.drv" = "builtin"
"mciseq.drv" = "builtin"
"mciwave.drv" = "builtin"
"mciavi.drv" = "builtin"
"mcianim.drv" = "builtin"
"msacm.drv" = "builtin"
"midimap.drv" = "builtin"
"glide2x" = "so"
"glide3x" = "so"
"opengl32" = "builtin"
"shfolder" = "builtin"
"rpcrt4" = "builtin"
"w32skrnl" = "builtin"
"wnaspi32" = "builtin"
"wow32" = "builtin"
"system" = "builtin"
"display" = "builtin"
"wprocs" = "builtin"
"wineps" = "builtin"
"icmp" = "builtin"

[x11drv]
; Number of colors to allocate from the system palette 
"AllocSystemColors" = "100"
; Use a private color map
"PrivateColorMap" = "N"
; Favor correctness over speed in some graphics operations
"PerfectGraphics" = "N"
; Color depth to use on multi-depth screens
;;ScreenDepth = 16
; Name of X11 display to use
;;Display = :0.0
; Allow the window manager to manage created windows
"Managed" = "Y"
; Run Wine windows in desktop. Contains "N" or something like "800x600".
"Desktop" = "N"
; Use XFree86 DGA extension if present
"UseDGA" = "Y"
; Use XShm extension if present
"UseXShm" = "Y"
; Enable DirectX mouse grab
"DXGrab" = "N"
; Create the desktop window with a double-buffered visual
; (useful to play OpenGL games)
"DesktopDoubleBuffered" = "N"
; Code page used for captions in managed mode
; 0 means default ANSI code page (CP_ACP == 0)
"TextCP" = "0"
; Use this if you have more than one port for video on your setup 
; (Wine uses for now the first 'input image' it finds).
;; XVideoPort = 43

[fonts]
;Read documentation/fonts before adding aliases
"Resolution" = "96"
"Default" = "-adobe-times-"

[serialports]
"Com1" = "/dev/ttyS14"
"Com2" = "/dev/ttyLT0"
"Com3" = "/dev/modem,38400"
"Com4" = "/dev/ttyS14"

[parallelports]
"Lpt1" = "/dev/lp"
"Lpt2" = "/dev/lp4"

[spooler]
"LPT1:" = "|lpr -P lp"
"LPT2:" = "|lpr -P lp4"
"LPT3:" = "/dev/lp3"
"LPT4:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"

[ports]
;read=0x779,0x379,0x280-0x2a0
;write=0x779,0x379,0x280-0x2a0

[spy]
"Exclude" = "WM_SIZE;WM_TIMER;"

[registry]
; Paths must be given in /dir/dir/file.reg format.
; Wine will not understand dos file names here...

;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
;Defaults are read all, write to Home
; Global registries (stored in /etc)
"LoadGlobalRegistryFiles" = "Y"
; Home registries (stored in ~user/.wine/)
"LoadHomeRegistryFiles" = "Y"
; Load Windows registries from the Windows directory
"LoadWindowsRegistryFiles" = "Y"
; TRY to write all changes to home registries
"WritetoHomeRegistryFiles" = "Y"
; Registry periodic save timeout in seconds
; PeriodicSave=600
; Save only modified keys
"SaveOnlyUpdatedKeys" = "Y"

[Tweak.Layout]
;; WineLook=xxx (supported styles are 'Win31'(default), 'Win95', 'Win98')
"WineLook" = "Win95"

[Console]
;Drivers=tty
;XtermProg=nxterm
;InitialRows=25
;InitialColumns=80
;TerminalType=nxterm

[Clipboard]
"ClearAllSelections" = "0"
"PersistentSelection" = "1"


[Drive D]
"Path" = "/mnt/cdrom"
"Type" = "cdrom"
"Device" = "/dev/cdrom"

[Drive H]
"Path" = "${HOME}"
"Type" = "network"
"Device" = ""

==========
Installing Lotus Notes r506 (r504 upgraded to r506 using incremental installers under MS-Windows)
==========

I already had a r506 shared install on my Windows partition. It was an r504 full shared install upgraded to r506. If I had the CD handy, I could have installed it under Wine and applied the upgrades to r506 (as I have done this in the past)

I relocated the shared Notes install to E:\lotus\notes, and my data directory to E:\lotus\notes\data. Drive E: in MS-Windows 2000 is /mnt/e under Linux and I mapped this to drive E: under Wine. This way I can share my Notes program and data files between MS-Windows and Linux/Wine.

To setup the registry, I ran wine e:\lotus\notes\setup.

I had a lot of trouble getting Notes to work. I tried all sorts of DLL combinations (builtin v's native). Eventually I discovered it was some redistributed files in the Notes program directory that were causing me grief. I removed them and ... I don't need MS-Windows 2000 anymore.

The files I removed (renamed actually) were these:
- imagehlp.dll
- msvcrt.dll
- olepro32.dll
- rpcrt4.dll (I think)

If these don't exist in your Notes program directory, don't worry.

==========
Running Notes under Wine
==========

I made this small script and placed it into ~/bin/notes

echo preparing to start notes...
if [ ! -f /mnt/e/lotus/notes/Notes.exe ]; then
  echo mounting /mnt/e...
  mount /mnt/e
fi
echo starting notes...
wine e:\\lotus\\notes\\nlnotes.exe =e:\\lotus\\notes\\data\\notes.ini

It mounts my Wine E: drive if it is not already mounted, then starts Notes using nlnotes.exe rather than notes.exe. This is because notes.exe launches the Notes splash screen first and then runs nlnotes.exe (I think). But when you close Notes (nlnotes.exe actually), the splash screen does not get closed and seems to remain running under Wine even though you can not see it. I think this happens in MS-Windows as well except that it is closed when nlnotes is closed. From my experience, nlnotes is all you need, and it does not waste memory (under wine at least). I now run nlnotes.exe instead of notes.exe under MS-Windows.

NB: chmod u+x ~/bin/notes before using it

==========
WIN.INI Modifications
==========

To control the date and time format (to dd/MM/yyyy and 24 hour time) I added these entries into C:\Windows\WIN.INI since I could not get them to work in the registry.

[intl]
iTLZero=1
iDate=1
sDate=/
sShortDate=dd/MM/yyyy
sLongDate=dddd, MMMM dd, yyyy
iTime=1
iTimePrefix=1
sTime=:
s1159=
s2359=
sTimeFormat=HH:mm:ss

NB: These work but I do not know what consistutes the minimum set.

==========
NOTES.INI
==========
This is an annotated extract of my NOTES.INI file in E:\lotus\notes\data.

[Notes]
Directory=e:\Lotus\Notes\Data - case does not seem to matter
WinNTIconPath=e:\lotus\notes\data\W32
Timezone=-10 - Australia
ClockType=24_HOUR - this did not do anything
DST=0 - our parent org does not run DST, so we can not either
TCPIP=TCP, 0, 15, 0
COM1=XPC,1,15,0,,12288,
COM2=XPC,2,15,0,,12292,115200,16,_pcgend.mdm,60,15 - my own generic modem file
COM3=XPC,3,15,0,
COM4=XPC,4,15,0,,12302,57600,16,_pcgend.mdm,60,15
COM5=XPC,5,15,0,,12292,115200,16,_PCGEND.MDM,60,15
Ports=TCPIP,COM4
DisabledPorts=COM2,COM5,COM1,COM3

MailServer=CN=amber/O=RailCom - amber is a Linux Domino server! We are running two one on RH7.0 and another on Debian. The one on Debian is not very stable yet, but it also has a stallion multi-port serial card, and is our Notes dial-in server. The RH7.0 server runs well, but currently only  as a mail/HTTP server and we are only running it on a non SMP 2.2 kernel (the box has two processors, SCSI RAID, and 1G RAM)

SPELL_DIR=e:\lotus\notes\data
DateOrder=DMY - this did not do anything either

==========

Well that is it. I'd be interested if this helps or if you find any improvements I can make.

Status for support can also be found here.


IBM has also released a Hanover native Linux Notes client.

John Smolenaers was nice enough to write up how to install it on Debian which isn't one of the supported platforms:

INSTALLING LOTUS NOTES 7.0.1 ON DEBIAN 3.1 (SARGE)

PREREQUISITES
This procedure is based on a standard Debian 3.1 (Sarge) Desktop installation using the Linux kernel 2.4 with Gnome as the default Desktop Environment.
PROCEDURE
1. Copy the directory Lotus Notes 7.0.1 for Linux Setup to /tmp or another location of your choice (if you do not know where Lotus Notes 7.0.1 for Linux Setup folder is, contact Internal IT for the location). You can either use your favourite GUI file browser or from a new terminal window by typing;
cp Source/Lotus Notes 7.0.1 for Linux Setup /tmp
2. From a terminal screen type in the following;

su root

and type in the root password when prompted.
3. Install the debian package libmotif3 by typing in;
apt-get install libmotif3

4. Create the file /etc/gre.conf by typing in;
nano )w /etc/gre.conf

or using your favourite text editor (e.g vi, emacs etc(). Insert the two following lines;
[1.7.8] <-------------- Version of Mozilla installed
GRE_PATH=/usr/lib/mozilla <-------------- Path to location of Mozilla
then save and close the file. If using nano as your text editor, you can save and close the file using the key sequence;
Ctrl+X
Y
Enter
5. Create the directory /opt/IBM by typing in;
mkdir /opt/IBM

6. Change the permission of the directory /opt/IBM to allow all users to have write permissions by typing in;
chmod 777 /opt/IBM

7. Ensure the file /tmp/Lotus Notes 7.0.1 for Linux Setup/setup_wct_platform.bin has execute permissions by typing in;
chmod 777 /tmp/Lotus\ Notes\ 7.0.1\ for\ Linux\ Setup/setup_wct_platform.bin

8. Exit as SU from the terminal screen by typing;
exit
and pressing;
Enter
9. Change to the Lotus Notes 7.0.1 for Linux Setup directory by typing in;
cd /tmp/ Lotus\ Notes\ 7.0.1\ for\ Linux\ Setup

10. Start the installation for Lotus Notes 7.0.1 by typing in;
./setup_wct_platform.bin

11. After a short while, the &Installation wizard for IBM Workplace Managed Client8 will open stating that it will install with the item &Lotus Notes Plugin8. Click Next to continue the installation.
12. Accept the terms and click Next.
13. Leave the &Directory Name:8 as the default unless you know what you are doing then click Next.
14. Click Next again and the installation wizard will begin installing files.
15. Once the files have finished installing, click Next.
16. The wizard will close and open the &Setup wizard for IBM Workplace Manage Client8 and begin installing more files. When it has almost finished, a new windows will open called &Installer8 (this is the Lotus Notes plugin installer).
17. Accept the terms again and click Next.
18. The installer will install the &Lotus Notes Application Plugin8 files. Once it has finished, it will state that you need to logout and log back in. Ignore this and click Finish.
19. The &Setup wizard for IBM Workplace Manage Client8 will finish and you can click Finish8.
20. Lotus Notes will open with two blank panes. Don,t panic, just close it as you need to set-up some environment variables and paths before it will work properly. Once closed, create the text file /home/<username>/.noteslauncher by opening a terminal window and typing in;
nano )w /home/<username>/.noteslauncher
or using your favourite text editor (e.g vi, emacs etc(). Insert the following lines;
#!/bin/sh
export NOTESBIN=/home/<username>/notes
export NOTESDATA=/home/<username>/notes/data
export NOTESDIR=/home/<username>/notes/data
export LD_LIBRARY_PATH=$NOTESBIN:$NOTESBIN/jvm/bin/classic:$NOTESBIN/jvm/bin:$LD_LIBRARY_PATH
export PATH=$NOTESBIN/jvm/bin:$NOTESBIN:$PATH
export CLASSPATH=./:$NOTESBIN/:$CLASSPATH
/opt/IBM/Workplace\ Managed\ Client/rcp/richclient -personality com.ibm.workplace.noteswc.standalone.linux.personality
then save and close the file. If using nano as your text editor, you can save and close the file using the key sequence;
Ctrl+X
Y
Enter
21. Ensure the file /home/<username>/.noteslauncher has execute permissions by opening a terminal window and typing in;
chmod 777 /home/<username>/.noteslauncher

22. On your desktop, go to the properties of the icon labelled IBM Lotus Notes by right clicking on it and selecting Properties from the context menu.
23. Select the Launcher TAB and change the Command: field to;
/home/<username>/.noteslauncher
Then click Close to close the properties window.
24. Launch Lotus Notes by double clicking on the IBM Lotus Notes icon on the desktop. Since this is the first time Lotus notes has been run, the Lotus Notes Client Configuration window will open at the Welcome screen.


How do you install and secure Domino on Linux?

There are several articles on this subject:
* The Lowdown on the Domino Linux Install
* Domino on Linux: Tune Up for Peak Performance
* Securing Domino on Linux

And IBM has posted information about it as well:
* Lotus Domino 6 Server for Linux


What are common useful commands for the AS/400?

WRKACTJOB
- displays all processes and their status including %cpu utilization
DSPHDWRSC TYPE(*AHW) OUTPUT(*PRINT)
- displays the current hardware configuration (#cpus, mem, etc.)
WRKDSKSTS OUTPUT(*PRINT)
- displays current disk configuration and utilization


How do you install Domino 6 on RedHat 8/9?
You have to install the compatibility libraries:
http://at.rpmfind.net/opsys/linux/RPM/redhat.com/dist/linux/8.0/en/os/i386/compat-libstdc++-7.3-2.96.110.i386.html

or you will get an error about libstdc++-libc6.1-1.so.2 not being found. This applies to Domino 6.0.0 and 6.0.1.


From Matthew Smith on getting it to work on Redhat 9:
Modify the hidden .bashrc_profile in the home\notes directory and add the following line:

  export LD_ASSUME_KERNEL=2.2.5

Re-login and Domino 6 should work fine.


How do you get LS:DO working on Linux?
From Ryan Hughes:

The first thing that has to be done is install UnixODBC.
Add the directory where the libodbc.so file (supplied by UnixODBC) is stored (in my case /usr/lib) to your PATH.
Then install the iSeriesODBC driver by following the iSeries ODBC Installation Guide.i.

Finally set up your data sources and you should be good to go.

On a side note, I did a test with the LS Connectors using the lctest tool (/opt/lotus/notes/linux/latest/lctest) and it seemed to work as well. The connectors would probably be the preferred way to go for data access (JDBC is a good option as well) but I needed LS:DO for some existing applications.


How big an AS/400 do I need for Domino?

Here are a few useful URLs:
http://www-912.ibm.com/supporthome.nsf/document/16533356
http://www-1.ibm.com/servers/eserver/iseries/domino/is4dprice.html
http://www-1.ibm.com/servers/eserver/iseries/domino/value.htm


How do you install Domino 6 on a Debian-based Linux?
From Ian Cherrill:


There are two problems to getting Domino 65 working on Knoppix 3.2 (based on Debian)
(1) Missing required library libstdc++-libc6.1-1.so.2
(2) Incompatible JVM

You'll need to fix the library problem before trying to install Domino if memory serves me, and the second problem needs to be fixed before trying to run the HTTP task, though it is best fix it as soon as Domino files have been installed.

To solve (1) use APT to install the correct DEB package like this:
apt-get install libstdc++2.9-glibc2.1
or if this does not work you can download the package manually and use
dpkg -i libstdc++2.9-glibc2.1
(maybe .DEB on the end of the filename - not sure, apt-get worked for me)

Solving (2) is more tricky:
(a) download IBM's JRE 1.3.1 for Linux on Intel from their website. Unpack it (using ark or tar zxvf on the command line) to a place of you choice - I chose /opt/lotus/ibmjava/jvm just to keep it near the Domino install. No "install" is required.

(b) as root change to the lotus program directory (/opt/lotus/notes/latest/linux). You need to symlink one directory ("jvm") and one file ("java") to the IBM Java installation, so:
rm java
ln -s /opt/lotus/ibmjava/jvm/bin/java java
mv jvm jvm_old
ln -s /opt/lotus/ibmjava/jvm/ jvm

Now you should be able to configure Domino 65 and then start the server - I did both using /opt/lotus/bin/server command. If you do this, make sure you are running an X desktop that the "notes" user can access otherwise the nice GUI configuration won't start. I logged into X as the notes user.


From Christopher J Wood:

As we started upgrading to 6.0.1 and then 6.0.1CF1, we started seeing more crashes with Domino under Linux. In working with support, it turned out to be related to the libc version that was running on our linux box.

We were running 2.2.5-10 and they recommended 2.2.5-43 or higher. To quote, try "glibc-VER.i686.rpm package ( I would use version 2.2.5-43 )."

I actually upgraded all the way to 2.3.1-xx and have run for a week without a crash, versus crashing once a day before.

The problem seemed to be with some old versions of libpthreads.so. I thought I would pass this on just in case someone else is struggling with crashes.


How do you start/stop Domino on Linux automatically?
Daniel Nashed has put up a nice script on his web site that does this and also gives you the option to connect to the Domino console. You can request your own copy of it here.

Do I have to install the Notes/Domino Server on Windows Server?
No, you do not need to install the Lotus Notes/Domino server on a Microsoft Windows Server if you are installing it on Windows. You can install it on Windows 2000, XP, etc. However, IBM/Lotus has a list of supported operating systems that they've tested on and may complain if you try to report a problem that happens on an unsupported platform.

How do you delete a profile document?

You have to use LotusScript:

  Set doc = db.GetProfileDocument(profilename)
  Call doc.Remove


What HelpDesk products are available for Notes?

Thanks to Charles Ross for compiling this list :-)


Company

Product name
Alvea
Help Desk
Arcidea (bought out Synergistics) helpdesk
Ardexus service CARE
Automation Centre Tracker Suite
DataWatch Visual Help Desk
Cadence Solutions Extended Reach�Helpdesk
CogniCase Maximizer Enterprise Helpdesk
Eden ProjectTrak Helpdesk
GeoCom GmbH HelpDesk
groupapps.com dispatch
Groupsoft Systems Groupsoft Help Desk for Domino
GSX GSX Help Desk
GWI c.support
Mayflower HelpDesk
Relavis (sells OverQuota) eService for Domino
Techflow, Inc. Enhanced Help Desk R4
Velocity Integration Software VI Service Desk

It's interesting that the PLATO Notes was originally created for a help desk application (see the History of Notes)

How do you calculate the week number in a year of a given date?

This formula satisfies ISO 8601:1988:

REM "This formula satisfies ISO 8601:1988";
REM "Formulae updated : 08.28.1997 ";
REM "by Stephen P.R. Renton (sprenton@mcmail.com)";
REM "Version: 1.01";
REM "Tested on : Lotus Notes Release 4.5";

REM "D is the date of interest.";
D := @TextToTime(@Prompt([OKCANCELEDIT]; "Enter Date"; "Please enter a
date to convert to a week number:"; ""));
REM "D := [31/12/95]";

FirstOfYear := @Date(@Year(D); 1; 1);
LastOfYear := @Date(@Year(D); 12; 31);
FirstDayNum := @Weekday(FirstOfYear);
LastDayNum := @Weekday(LastOfYear);

REM "ISO weeks start on Monday and ends on Sunday.";
ISOFirstDayNum := @If(FirstDayNum = 1; 7; FirstDayNum - 1);
ISOLastDayNum := @If(LastDayNum = 1; 7; LastDayNum - 1);

REM "The first and last ISO week is the first";
REM "and last ISO week to include Thursday";
IsFirstWeek := 7 - ISOFirstDayNum > 2;
IsLastWeek := 7 - ISOLastDayNum < 4;
REM "The date of the first day of the first ISO week";
ISOFirstDay := @If(IsFirstWeek;
            @Adjust(FirstOfYear; 0; 0; 1 - ISOFirstDayNum; 0; 0; 0);
            @Adjust(FirstOfYear; 0; 0; 8 - ISOFirstDayNum; 0; 0; 0));
REM "The date of the last day of the last ISO week";
ISOLastDay := @If(IsLastWeek;
            @Adjust(LastOfYear; 0; 0; 7 - ISOLastDayNum; 0; 0; 0);
            @Adjust(LastOfYear; 0; 0; -ISOLastDayNum; 0; 0; 0));

REM "Date outside ISOFirstDay and ISOlastDay";
REM "are from the previous or next year";
REM "Return the ISO week number and exit";

FirstWeekNextYear := @If(D > ISOLastDay; @Return(@Prompt([OK]; "FWNY";
@Text(@Year(D)+1) + "W01")); NULL);

REM "I suspect this is where Julian dates would be useful";
REM "A recursive call could be used in a real language";
LastWeekLastYear := (D - @Adjust(FirstOfYear; -1; 0; 0; 0; 0; 0))/60/60/24/7;
AdjustLastWeek := 1 - (LastWeekLastYear - @Integer(LastWeekLastYear));
@Set("LastWeekLastYear"; LastWeekLastYear + AdjustLastWeek);
@If(D < ISOFirstDay;
@Return(@Prompt([OK]; "LWLY"; @Text(@Year(D) - 1) + "W" +
@Text(LastWeekLastYear))); NULL);

REM "If you get this far, the date falls into an ISO week this year";
REM "Convert the difference in seconds to weeks";
NumWeeks := (D - ISOFirstDay)/60/60/24/7;

REM "Fractions indicate that the date falls";
REM "in the middle of the ISO week";
WeekAdjust := 1 - (NumWeeks - @Integer(NumWeeks));
ISOWeekNum := NumWeeks + WeekAdjust;

REM "Conform to ISO 8601 format";
Pad:=@If(ISOWeekNum<10;"0";"");
Result := @Text(@Year(D))+"W"+Pad+@Text(ISOWeekNum);

@Prompt([OK];"Week number"; Result)

Here is another version that gives you a week number in another ISO format:

REM "Formulae Calculate the Week Number(01-53) for any Date. ";
REM "The output follows the ISO 8601:1988 standard: ex 1997-W31-4 for 1997.07.31 ";
REM "Formulae writer : Nikolai Aasen (nsaa@pvv.org), UNI Storebrand, Norway";
REM "Formulae written : 1997.07.30";
REM "Formulae updated : 1997.08.04";
REM "Version  : 1.03";
REM "Tested on   :Lotus Notes 4.6PreRelease2";
REM "This formulae is available in the";
REM "Lotus Notes FAQ: http://www.keysolutions.com/NotesFAQ/";
REM "More Calendar information in http://www.pip.dknet.dk/~pip10160/calendar.html"; 
REM "ISO 8601:1988 summary at: http://quake.stanford.edu/~lyle/ISOdate/Date.html";
REM "--------------------------------------------------------------------------------------------------";             
REM "Replace D with the date of interest.";
D := [1997.31.07];

REM "**************************";
REM"Calculate some data for this Year";
REM "**************************";
FirstOfYear := @Date(@Year(D); 1; 1);
LastOfYear := @Date(@Year(D); 12; 31);
FirstDayNum := @Weekday(FirstOfYear);
REM "ISO weeks start on Monday and ends on Sunday.";
ISOFirstDayNum := @If(FirstDayNum = 1; 7; FirstDayNum - 1);

REM " Week 1 of any year is the week that contains the first Thursday in January.";
REM "=1 if 1. jan = man - thu. WeekNumber is then 1, else 0";
IsFirstWeek := 7- ISOFirstDayNum >2;

REM "The first Monday after 1. jan this Year";
FirstMonday := 9 - ISOFirstDayNum;

REM "Number of Days from 1. jan to D";
DaysToDateD:=(D-FirstOfYear)/60/60/24+1;

REM "Number of days in Year(either 365 or 366)";
DaysInYear:=(LastOfYear-FirstOfYear)/60/60/24;

REM "Number of Weeks in Year. Most years have 52 weeks, but years that start on a 
Thursday and leapyears that start on a Wednesday have 53 weeks.";
NumberOfWeeksThisYear:=@If( (ISOFirstDayNum=4 | (ISOFirstDayNum=3 & 
DaysInYear=366));53;52 );

REM "***************************";
REM"Calculate some data for last Year  ";
REM "***************************";
FirstOfLastYear := @Date(@Year(D)-1; 1; 1);
LastOfLastYear := @Date(@Year(D)-1; 12; 31);
FirstDayNumLast := @Weekday(FirstOfLastYear);
REM "ISO weeks start on Monday and ends on Sunday.";
ISOFirstDayNumLast := @If(FirstDayNumLast = 1; 7; FirstDayNumLast - 1);

REM "Number of days in Year(either 365 or 366)";
DaysInYearLast:=(LastOfLastYear-FirstOfLastYear)/60/60/24;

REM "Number of Weeks Last Year. Most years have 52 weeks, but years that start on a 
Thursday and leapyears that start on a Wednesday have 53 weeks.";
NumberOfWeeksLastYear:=@If( (ISOFirstDayNumLast=4 | (ISOFirstDayNumLast =3 & 
DaysInYearLast=366));53;52 );

REM "************************";
REM"Calculates the Week Number  ";
REM "************************";


DDayNum := @Weekday(D);
ISODDayNum := @If(DDayNum = 1; 7; DDayNum - 1);

REM"Is D in the last Week of the last Year?";
DayInLastWeek := @If((DaysToDateD<FirstMonday & IsFirstWeek = 0);
                                @Return( @Text(@Year(D)-1)+"-W"+@Text(NumberOfWeeksLastYear)+"-"+@Text(ISODDayNum));
                                 NULL);


REM "Calculate number of Complete Weeks Between D and 1.jan";
ComplNumWeeks:=@Integer((DaysToDateD-FirstMonday)/7);

REM "Are there remaining days?";
RemainingDays:=@If( (DaysToDateD+1-(FirstMonday+7*ComplNumWeeks))>0);

NumWeeks:= IsFirstWeek+ComplNumWeeks+1;

Out :=
@If(RemainingDays;
@If( (NumWeeks>52 & NumWeeks>NumberOfWeeksThisYear );
         @Return(@Text(@Year(D)+1)+"-W01-"+ @Text(ISODDayNum));
          @Return(@Text(@Year(D))+"-W"+@Right("0"+@Text(NumWeeks);2)+"-"+@Text(ISODDayNum))); 
@Return(@Text(@Year(D))+"-W"+@Right("0"+@Text(NumWeeks-1);2) +"-"+@Text(ISODDayNum)));
Out

This LotusScript version comes from Christian Meis:

'CalculateWeekNumbers: 

Option Declare


Sub Initialize
     
%REM
This short agent shows how the calendar week
function can be implemented.

Christian Meis, 09.04.1999
E-Mail: Christian.Meis@mlc.de
%END REM
     
  Dim dateval As Variant
  Dim test As String
     
  dateval = Cdat( Inputbox( "Please enter date: " ) )
  test = GetCalendarWeek( dateval )
     
  Messagebox( Cstr( dateval ) & " --> " & test )
     
End Sub


Function GetCalendarWeek( Byval inputdate As Variant ) As String
     
%REM
This function calculates the calendar week number 
(ISO standard) for a given date value. The format
function of LotusScript (parameter "ww") does not solve 
this problem. 

Monday is the first day of the week. Week #1 is the week 
that contains the 4th of January (ISO 8601). The week at the
end/beginning of the year belongs to the next/previous year,
if there are 3 days or less of that week in the year in question.

Christian Meis, 4.2.2000
%END REM
     
  Dim InputDateOffset As Integer
  Dim YearInQuestion As Integer
  Dim January4 As Variant
  Dim January4Offset As Integer
  Dim FirstMondayOfYear As Variant
  Dim January1Offset As Integer
  Dim December31Offset As Integer
  Dim weeknum As Integer
     
  ' The year value is preset with that of the input date
  YearInQuestion = Year( inputdate )
     
  ' Calculate offset to monday from the input date
  InputDateOffset = CalculateIsoWeekday( inputdate )
     
  ' Calculate offsets for the first/last day of the year
  January1Offset = CalculateIsoWeekday( Cdat( "01.01." & Cstr( YearInQuestion ) ) )
  December31Offset = CalculateIsoWeekday( Cdat( "31.12." & Cstr( YearInQuestion  ) ) ) 
     
  ' If the input date is before the 4th of January and the year starts with
  ' a friday, saturday or sunday, the week belongs to the previous year
  ' if the entered date is not a monday or tuesday
  If Month( inputdate ) = 1 And Day( inputdate ) < 4 And January1Offset> 3 And InputDateOffset > 1 Then
    YearInQuestion = YearInQuestion - 1
  End If

  ' If the input date is after the 28th of December and the year ends with
  ' a monday, tuesday or wednesday, then the week belongs to the following year
  ' if the entered date is not a saturday or sunday
  If Month( inputdate ) = 12 And Day( inputdate ) > 28 And December31Offset < 3 And InputDateOffset < 5 Then
    YearInQuestion = YearInQuestion + 1
  End If
     
  ' The 4th of January defines week #1
  January4 = Cdat( "04.01." & Cstr( YearInQuestion ) )
     
  ' Offset to the monday of week #1 
  FirstMondayOfYear = Cdat( January4 - CalculateIsoWeekday( January4 ) )
     
  ' The time range between the monday of week #1 and the monday
  ' of the week in question is divided by 7, plus 1 for the first week
  weeknum = ( inputdate - InputDateOffset - FirstMondayOfYear ) \ 7 + 1
     
  ' The return value is a string with the week number and the year
  GetCalendarWeek = Cstr( weeknum ) & " " & Cstr( YearInQuestion )
     
End Function


Function CalculateIsoWeekday( tmpdate As Variant ) As Integer
     
%REM
This function converts the weekday-numbers from the
standard function to an offset acc. to the ISO version
monday -> 0, ... , sunday -> 6
%END REM
     
  Dim n As Integer
     
  n = Weekday( tmpdate )
   
  If n = 1 Then ' sunday to end of week
    n = n + 7
  End If
     
  CalculateIsoWeekday = n - 2
     
End Function

This version for 53 week years comes from Bill Westaway (Bill.Westaway@fmr.com):

The following "week of the year" formula was adopted from the set that shows on your web site.
It is for applications that require 53 week years because the last few days of the year still occur in a calendar year (government reporting or payroll support would be good examples). 2002 is a good example of a 53 week year.
(you can actually get a 54th week by this definition - this formula will also work then)

The formula works in views, fields, and agents and should work for every Notes/Domino release 3.0 and greater.

As was your formula -- it's "Monday" based.

I've used your padding concept for text conversion at the end. I normally leave it in numeric form and convert to text only when I need to combine with other text, as is done in the example below.

I've tried to keep this fairly efficient (I think I might be able to improve on the WeekOfYear_Gross variable formula)

REM { routine to figure out the week of the year a given date falls into --- for those applications that require a 53 week year};
REM { (i.e. those applications where the last week of the year is the first few days of the week that};
REM {    splits across a year end boundary};
REM { it's also true that the first week of the year is defined as the last days of the week that splits across a year end boundary.};
REM {   Its actually possible to get 54 week years by this definition!};

REM { Set the below Variable (SourceDate) to the value of the field that contains the date we will work on};

SourceDate := CompletedOnDist;

REM {First fugure out what the first day of the year in question is.};

FirstOfYear := @Date(@Year(SourceDate); 1; 1);
FirstDayNum_SundayBased := @Weekday(FirstOfYear);
FirstDayNum_MondayBased := @If(FirstDayNum_SundayBased = 1; 7;
FirstDayNum_SundayBased -1);

REM {Then get the week of the year for this date};
WeekOfYear_Gross := @Integer(@Integer(((@Date(SourceDate) - FirstOfYear) / (86400)) + 1) / 7) +1;

REM {Then adjust the week because the first day of they year may not fall on Monday};

DayOfWeek := @Weekday(SourceDate);
WeekOfYearNum := @If(DayOfWeek >= FirstDayNum_MondayBased;
WeekOfYear_Gross; WeekOfYear_Gross + 1);

Pad := @If(WeekOfYearNum < 10; "0"; ""); "Week " + Pad + @Text(WeekOfYearNum)

Stewart Clow (SCLOW@uk.ibm.com) modified Bill Westerly's formula to start weeks on Monday (the UK standard) instead of Sunday (the US standard):

REM { Returns the days at the start of the year up to Sunday as Week 1. Weeks start on Monday. FYI: 1984 is 54 weeks!
i.e. always returns week number for current year, rather than ISO week which can be week number for previous/next year. }

SourceDate := @Date(2009; 1; 11);

Jan1 := @Date(@Year(SourceDate); 1; 1);

DaysSinceJan1 := 1 + (SourceDate - Jan1) / 86400;
Jan1Weekday_SundayIs1 := @Weekday(Jan1);

Jan1Weekday_MondayIs1 := @If(Jan1Weekday_SundayIs1 = 1; 7; Jan1Weekday_SundayIs1 - 1);

WeekNum := @Integer((5 + DaysSinceJan1 + Jan1Weekday_MondayIs1) / 7);

PadChar := @If(WeekNum < 10; "0"; "");

"Week " + PadChar + @Text(WeekNum)

How do you display a custom image in a Notes view?

Editor's note: this sounds like an unsupported "feature" in R5. Use at your own risk, as it may change in future versions.

This is from Sushanta Kumar Manna's Notes Advisor Tip:

1. In the PostSave Event of the form, get the RichText Filed and set the IsSummary Value to true (normally this is set to false for all RichText Items). This example uses an RTF named "Picture":

Sub Postsave(Source As Notesuidocument)
  Dim doc As NotesDocument
  Dim item As NotesItem
  Set doc = Source.Document
  Set item = doc.GetFirstItem("Picture")
  item.IsSummary = True
  Call doc.Save(False,True)
End Sub

2. Compose the form.

3. Insert a image resource in a rich text field using the Create|Image Image Resource menu option. Do not just import an picture as this will give you the Red Box of Death (RBOD).

4. Save the document.

5. Now Create a view for the specific form and map the Rich text field "Picture" to the first column and don't forget to tick the column property "Display value as Icons".

6. Now you can view your image in the first column of the view.

Here's a tip from Stephen Knight on how to use image resources to do something similar:

You add an image resource then put the name of that resource in the column -- this can be a literal, i.e. "logo.gif" or a fieldname to make the image variable.� Then just tick the box "display as icon" and it appears....� the image needs to be the correct size and you have to extend the row height to a suitable number... shrink to fit doesn't work. You can also include multiple images using a multi-value field or list in the column, tick the box saying "display multiple values as separate entries", sort the column, and they all appear.


Can you stop the refresh view indicator for displaying if you use @Today in a view?

This is an undocumented workaround. If you use this formula code:

  Today := @TextToTime("Today");

The view will still get updated daily, but the refresh view indicator will not be displayed.


How do you prevent jagged right table edges when merging/splitting cells?
From Pam Clinton:

When you create a new table, add a column that is as small as possible (0.125") and hide all cell edges and make it transparent. Never use this column. Don't merge it in, etc. Notes just screwed up the last column when displaying these jagged tables.

Unfortunately, there's no fix for corrupted tables except recreating them.


How do you pass information between UI windows or frames in Notes?

You can use:
@SetProfileField([NoPersist];"MyVariable";@username)

This information is kept in the Notes client's cache and is only valid until the Notes user has logged out. It's meant as a replacement for using @SetEnvironment to put parameters in the notes.ini file. It also only seems to be valid windows/frames within the same Notes database, so each database seems to have its own profile doc cache.


How do you synchronize custom databases with PDAs?

Lotus' Domino Everyplace Enterprise Services (DEES) was the latest attempt by Lotus to do this. It was supposed to ship when R6 was released, but has disappeared from any mention. The Websphere Everyplace Access (WEA) PDA client is the next attempt at it, but it won't be available until the R7 timeframe (late 2004 at the earliest :-)

In the meantime, you should look at these tried and true applications:
Pylon Pro
mForms
OneBridge Mobile Data Suite


How do you debug Notes/Domino Java Agents using Eclipse?
Ian Conner wrote a great article on this:

http://www-128.ibm.com/developerworks/lotus/library/notes-eclipse/

Bob Balaban also has an article on this:

http://www.looseleaf.net/looseleaf/lsihome.nsf/612ad3d77c83a706852567e7006b9a50/719a8d01b564680085256ebb007dfadc


How do you copy a view/folder's design into another view/folder?

You can use this function that is new to R6:
@UpdateViewDesign(targetView, sourceView)

This will copy the design from one view or folder to another view/folder.


How do you show the search bar automatically in a specific view?
In that view's PostOpen event, set the code type to @formula and use this:

    @Command([ViewShowSearchBar]; "1")

This will put the focus on the search bar. If you want to put it on the view, add this line afterwards:

    @Command( [OpenView]; "NameOfThisView" )

How do you specify database categories in Domain Full-Text Search?
In the query, you have to compare the "DbCategories" field to the categories you want to include. For example:

[DbCategories] Contains ("Category1" OR "Category2")) AND (<FTSearchExpression>)


What Are Domino's Field Size Limits?
You can find the answers in Mike Woolsey and Ben Langhinrichs' Domino Size Limits page.

How do you do an SSL POST from a Java Agent?
From Karl Merckel on the Notes forums:

This solution uses HttpClient and JSSE which you can download from these sources:

HttpClient:
http://jakarta.apache.org/commons/httpclient/index.html

Dependancies:
http://jakarta.apache.org/commons/httpclient/dependencies.html

JSSE1.3
http://java.sun.com/products/jsse/index-103.html

After downloading and unzipping the packages retrieve the following JAR files and put them in jvm\lib\ext

commons-httpclient-3.0.jar
commons-logging.jar
commons-codec-1.3.jar
junit.jar

jcert.jar
jnet.jar
jsse.jar


One last step and I am not sure if this is neccassary:

Modify the java.security document (in /jvm/lib/security) and add a security provider : com.sun.net.ssl.internal.ssl.Provider.
Example :
security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.net.ssl.internal.ssl.Provider

Modify the java.policy document (in jvm/lib/security) and add a permission :
permission java.util.PropertyPermission "java.protocol.handler.pkgs", "write";

This solution work in ND6+ because it needs JDK 1.3+.


Here is some sample code:

import lotus.domino.*;
import java.io.IOException;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.InputStreamRequestEntity;

import java.io.File;
import java.io.FileInputStream;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      HttpClient httpclient = new HttpClient();
      PostMethod post = new PostMethod("https://yourdomain.com?action=login&username=whatever");

      try {
        int result = httpclient.executeMethod(post);
        // Display status code
        System.out.println("Response status code: " + result);
        // Display response
        System.out.println("Response body: ");
        System.out.println(post.getResponseBodyAsString());
      } finally {
        // Release current connection to the connection pool once you are done
        post.releaseConnection();
      }
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}

Can you use Notes objects in LS2J Java code?
No. All Notes/Domino backend classes should only be accessed by Lotuscript when you call Java code using LS2J.

In Lotuscript code, all NotesSessions objects point to the same object as well (despite being created multiple times using New NotesSession), so there is no need to pass it to different functions.
However, in Java, you can have multiple JavaSession objects, so you should be passing a single JavaSession object to different Java methods to avoid wasting system resources.


How do you create a database that contains encrypted web-submitted documents?

You can do this two ways, depending on whether you can encrypt this for a specific list of users or if you need to allow a changing group of users to do it.

For a changing group of users, you can use a mail-in database set that is set to encrypt incoming mail:
1) Create a new key pair
2) Extract public key from this pair
3) Paste puclic key into the public key field of the mail-in DB document
4) For the mail-in DB, enable the option to automatically encrypt incoming mail
5) When the form is submitted, have your agent mail the document to the mail-in DB
6) Distribute the key pair to any user who needs to see the encrypted data
This has the problem of not being able to revoke the key from users who no longer should see the encrypted data (you can't guarantee the user didn't make a backup of their user.id file if you delete the encryption key from their current ID)

For a specific list of users, your webquerysave agent can do this:

'create empty secret and public encryption key items
Set itemPublicKeys = New NotesItem(doc, "PublicEncryptionKeys", "")
Set itemSecretKeys = New NotesItem(doc, "SecretEncryptionKeys", "")
'add public keys of users
Call itemPublicKeys.AppendToTextList(<array of user names>)
'encrypt the note with the above public keys

Call doc.Encrypt()
'remove the dummy SecretEncryptionKeys item and save
Call doc.RemoveItem("SecretEncryptionKeys")
Call doc.Save(True, False, True)

This solution is problematic if the user list changes because all the old documents would have to be re-encrypted for the new list of users.


How do you output a PDF from Notes?

There are a few solutions for this:
- DominoPDF (uses the HTTP task to help convert documents to PDF)
- N2PDF (an export-filter add-in for Notes)
- PDF995 (a PDF driver with COM automation under Windows)


How do you create a NotesDocumentCollection?
A NotesDocumentCollection is useful for storing a set of documents that you later want to put into a folder or delete; it's a lot faster to make one call than to delete or folder documents one at a time. Unfortunately, there's no simple way to do this such as "Dim dc As NotesDocumentCollection" which is what most people would try. Instead, you have to get it by using one of the search collection APIs with a key that can't be found such as this:

Dim session As New NotesSession
Dim dc As NotesDocumentCollection
Set dc = session.CurrentDatabase.GetProfileDocCollection("nonexistingform") 

or by doing this:

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim view As NotesView
Set view = db.GetView("($All)")
Dim dc As NotesDocumentCollection
Set dc = view.GetAllDocumentsByKey("12345") ' non-existent key


How Do the C&S Forms/Fields Work Together?

You can find out from the documentation for the schema:

http://www.ibm.com/developerworks/lotus/documentation/dw-l-calendarschema.html

How do you create tables with rounded corners in Notes?

This is a popular thing to do in the web world, but you can do it by simply creating a gif image that is a rounded rectangle. Then you apply it to a table's properties as a border image. The Notes client will overlay this image over the borders of your table and you magically get a rounded table displayed in the Notes client.

This is covered in several blogs:
- nsftools
- Geniisoft
- BizzyBee


How do you get the HTML for a Rich Text field?
Thanks to Mark Vincenzes:

This URL will give you the HTML for a specific field so you don't have to parse an HTML page for it:
/database.nsf/view-unid/doc-unid/ItemName?OpenField
However, the content may be slightly different because OpenField runs in a different context than viewing an entire document.


How do you disable NSD so exceptions go to Visual Studio?
If you add
APIDeveloper=1
to your Notes client's notes.ini, NSD will be disabled and the current JIT (Just In Time) debugger (usually Visual Studio) will be invoked.

You can also do "nsd -detach" if you're running Domino 8.x and above which uses a Windows service for NSD.


What causes "Entry Not Found In Index" Errors?
This is generally caused by @DbLookup/@DbColumn on a view and the lookup key is not found.
However, it can also be caused by a save/replication conflict in the same view used for the lookups. If this is true, you can add "(!@IsAvailable($Conflict))" to the view selection formula to exclude conflicts.
It can also be caused by the view setting "Generate Unique Keys in Index for ODBC" if there's a replication conflict in the same view. In this case, you'll get an error if you try to open the view but you don't see any formulas or events that are doing any lookups.


Can LotusScript operate on Private Views?

From Phanikumar <gundimedap@yahoo.com>"

LotusScript can access private views by opening the desktop.dsk file.

Being able to do this is useful if there is design change on the private view. Users won't get the new design unless they remove the database icon/bookmark from their desktop and re-add it. However, you can send them a button with LotusScript to open their desktop.dsk and delete the private views so they will get the new view design the next time they use the view.

Can you add a database to the replicator page?

From Jason Collier:

Sub Click(Source As Button)

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesUIDatabase
Dim replica As NotesDatabase
Dim dbLookUp As NotesDatabase

Const LookupServer = "servername"
Const LookupDb = "databasename.nsf"
Set dbLookUp = session.GetDatabase( LookUpServer, LookUpDb )
'set the values of the replication

Set replica = dbLookUp.CreateReplica( "", "databasename.nsf" )

'Add Local and Server Icons to Workspace and Replicator Tab
Call workspace.OpenDatabase( LookUpDb.Server , LookUpDb.filename)
Set db = workspace.CurrentDatabase
Call workspace.OpenDatabase( "" , LookUpDb.filename)
Set db = workspace.CurrentDatabase


Msgbox("Replica database created for: "+ LookUpDb)

End Sub


Can you refresh a document in the Notes client after changing a rich text field?

What you have to do is:
1) set the SaveOptions field to "0"
2) save using uidoc.save (doesn't really save because of the SaveOptions field)
3) get a reference to the original document using uidoc.Document
4) close the document in the Notes client using uidoc.Close
5) use ws.EditDocument to re-open the document in edit mode

Here's a code snippet for doing this:

  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  Dim doc As NotesDocument
  Set doc = uidoc.Document
  Call doc.ReplaceItemValue("SaveOptions", "0")
  uidoc.Save
  Set doc = uidoc.Document
  uidoc.Close
  Call workspace.EditDocument(True, doc)
  Call doc.RemoveItem("SaveOptions")


How do you track who deleted a document?
From Dirk Hamilton:
This is used to log each document deletion. It creates a log document which is displayed in a "deletion log" view so users can clearly see who deleted each document instead of pointing fingers :-)

Sub Postdocumentdelete(Source As Notesuidatabase)
  Dim s As New notessession
  Dim db As notesdatabase
  Dim d3 As notesdocument
  Dim c As notesdocumentcollection
  Dim d As notesdocument
  Set db = s.currentdatabase
  Set c = source.documents
  Set d = c.getfirstdocument
  Do 
    f = d.form
    If f(0) = "log" Then Goto skipper
    i = d.issue
    p = d.pkey
    'create log entry
    Set d3 = db.createdocument
    d3.form = "log"
    d3.when = Now
    d3.who = Evaluate("@Name([CN];@V3UserName)")
    d3.what = "Deleted a document. Form = " + f(0) + " :: issue = " + i(0) + " :: pkey = " + p(0)
    Call d3.save(True,False)
   skipper:
    Set d = c.getnextdocument(d)
  Loop Until d Is Nothing
End Sub


How Do You Run Console Commands From Lotuscript?

Here's an example of code (from Daniel Nashed) on how you can issue Remote Console commands from Lotuscript:

Dim rcmd_server As String
Dim rcmd_command As String     
Dim rcmd_result as String

rcmd_server = "notes.nashcom.de"
rcmd_command = "show server"

Dim remoteConsole As New RemoteConsole (rcmd_server)

recmd_result = remoteConsole.Execute (rcmd_command)

REM W32 De
clares
Declare Function W32_NSFRemoteConsole Lib "NNOTES.DLL" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Long) As Integer
Declare Function W32_OSLockObject  Lib "NNOTES.DLL" Alias "OSLockObject" (Byval handle As Long) As Lmbcs String
Declare Sub W32_OSUnlockObject  Lib "NNOTES.DLL" Alias "OSUnlockObject" (Byval handle As Long) 
Declare Sub W32_OSMemFree  Lib "NNOTES.DLL" Alias "OSMemFree" (Byval handle As Long)
Declare Function W32_OSLoadString Lib "NNOTES.DLL" Alias "OSLoadString" (Byval hModule As Long, Byval stringCode As Integer, _
Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer

REM MAC Declares
Declare Function MAC_NSFRemoteConsole Lib "NotesLib" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer
Declare Function MAC_OSLockObject  Lib "NotesLib" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String
Declare Sub MAC_OSUnlockObject  Lib "NotesLib" Alias "OSUnlockObject" (Byval handle As Integer) 
Declare Sub MAC_OSMemFree  Lib "NotesLib" Alias "OSMemFree" (Byval handle As Integer)
Declare Function MAC_OSLoadString Lib "NotesLib" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _
Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer

REM Linux Declares
Declare Function LINUX_NSFRemoteConsole Lib "libnotes.so" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Long) As Integer
Declare Function LINUX_OSLockObject  Lib "libnotes.so" Alias "OSLockObject" (Byval handle As Long) As Lmbcs String
Declare Sub LINUX_OSUnlockObject  Lib "libnotes.so" Alias "OSUnlockObject" (Byval handle As Long) 
Declare Sub LINUX_OSMemFree  Lib "libnotes.so" Alias "OSMemFree" (Byval handle As Long)
Declare Function LINUX_OSLoadString Lib "libnotes.so" Alias "OSLoadString" (Byval hModule As Long, Byval stringCode As Integer, _
Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer

REM AIX Declares
Declare Function AIX_NSFRemoteConsole Lib "libnotes_r.a" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer
Declare Function AIX_OSLockObject  Lib "libnotes_r.a" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String
Declare Sub AIX_OSUnlockObject  Lib "libnotes_r.a" Alias "OSUnlockObject" (Byval handle As Integer) 
Declare Sub AIX_OSMemFree  Lib "libnotes_r.a" Alias "OSMemFree" (Byval handle As Integer)
Declare Function AIX_OSLoadString Lib "libnotes_r.a" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _
Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer

REM Solaris Declares
Declare Function SOLARIS_NSFRemoteConsole Lib "libnotes.so" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer
Declare Function SOLARIS_OSLockObject  Lib "libnotes.so" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String
Declare Sub SOLARIS_OSUnlockObject  Lib "libnotes.so" Alias "OSUnlockObject" (Byval handle As Integer) 
Declare Sub SOLARIS_OSMemFree  Lib "libnotes.so" Alias "OSMemFree" (Byval handle As Integer)
Declare Function SOLARIS_OSLoadString Lib "libnotes.so" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _
Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer

Class RemoteConsole
Public IsError As Variant
Private rc As Integer
Private Long_hBuffer As Long
Private Integer_hBuffer As Integer
Private Server As String
Private Command As String
Private Result As String
Sub New (InputServer As String)
If InputServer = "" Then
Me.IsError = True
Else
Me.Server = InputServer
Me.IsError = False
End If
End Sub
Function get_platform () As String
Dim tmp_platform As Variant
Dim lower_platform As String
tmp_platform = Evaluate(|@Implode(@Platform([Specific]);" ")|)
lower_platform = Lcase(Cstr(tmp_platform(0)))
REM Messagebox Cstr(tmp_platform(0))
If (Instr (lower_platform, "aix")) Then
get_platform = "aix"
Elseif (Instr (lower_platform, "solaris")) Then
get_platform = "solaris"
Elseif (Instr (lower_platform, "linux")) Then
get_platform = "linux"
Elseif (Instr (lower_platform, "win")) Then
get_platform = "w32"
Elseif (Instr (lower_platform, "mac")) Then
get_platform = "mac"
Else
Messagebox "Unsupported Platform : >" + lower_platform + "<"
get_platform = ""
End If
End Function
Function Execute (InputCommand As String) As String
Dim StrLen As Integer
Dim errorStr As String * 1024
Dim Session As New NotesSession
Dim platform As String
platform = get_platform
REM Messagebox session.platform
REM Messagebox platform
If Me.Server = "" Then
Me.Execute = "No server specified"
Me.IsError = True
Exit Function
End If
If InputCommand = "" Then
Me.Execute = "No command specified"
Me.IsError = True
Exit Function
End If
Me.command = InputCommand + Chr (0)
Me.server = Me.server + Chr(0)
Select Case platform
Case "w32"
Me.rc = W32_NSFRemoteConsole (Me.Server, Me.Command, Long_hBuffer)
Case "mac"
Me.rc = MAC_NSFRemoteConsole (Me.Server, Me.Command, Integer_hBuffer)
Case "linux"
Me.rc = LINUX_NSFRemoteConsole (Me.Server, Me.Command, Long_hBuffer)
Case "aix"
Me.rc = AIX_NSFRemoteConsole (Me.Server, Me.Command, Integer_hBuffer)
Case "solaris"
Me.rc = SOLARIS_NSFRemoteConsole (Me.Server, Me.Command, Integer_hBuffer)
Case Else
Exit Function
End Select
If (Me.rc <> 0) Then
Me.IsError = True
Select Case platform
Case "w32"
StrLen = w32_OSLoadString(0&, Me.rc, errorStr , Len(errorStr) - 1)
Case "mac"
StrLen = MAC_OSLoadString(0&, Me.rc, errorStr , Len(errorStr) - 1)
Case "linux"
StrLen = LINUX_OSLoadString(0&, Me.rc, errorStr , Len(errorStr) - 1)
Case "aix"
StrLen = AIX_OSLoadString(0&, Me.rc, errorStr , Len(errorStr) - 1)
Case "solaris"
StrLen = SOLARIS_OSLoadString(0&, Me.rc, errorStr , Len(errorStr) - 1)
Case Else
Exit Function
End Select
If (StrLen = 0 ) Then
errorStr = ""
End If
Me.Result= "Error: [" & Cstr (rc) & "] " + errorStr
Else
Select Case platform
Case "w32"
Me.Result = W32_OsLockObject (Long_hBuffer) + Chr (0)
Call W32_OSUnlockObject (Long_hBuffer)
Call W32_OsMemFree (Long_hBuffer)
Case "mac"
Me.Result = MAC_OsLockObject (Integer_hBuffer) + Chr (0)
Call MAC_OSUnlockObject (Integer_hBuffer)
Call MAC_OsMemFree (Integer_hBuffer)
Case "linux"
Me.Result = LINUX_OsLockObject (Long_hBuffer) + Chr (0)
Call LINUX_OSUnlockObject (Long_hBuffer)
Call LINUX_OsMemFree (Long_hBuffer)
Case "aix"
Me.Result = AIX_OsLockObject (Integer_hBuffer) + Chr (0)
Call AIX_OSUnlockObject (Integer_hBuffer)
Call AIX_OsMemFree (Integer_hBuffer)
Case "solaris"
Me.Result = SOLARIS_OsLockObject (Integer_hBuffer) + Chr (0)
Call SOLARIS_OSUnlockObject (Integer_hBuffer)
Call SOLARIS_OsMemFree (Integer_hBuffer)
Case Else
Exit Function
End Select
Me.IsError = False
End If
Me.Execute = Me.Result
End Function End Class


How do you find out if a document has been foldered?
You can use the FolderReferences property of a document to do this. This code will put all documents that have not been foldered into a new "Lost Documents" folder:

Sub Initialize
  Dim sess As New NotesSession
  Dim db As NotesDatabase
  Set db = sess.CurrentDatabase
  db.FolderReferencesEnabled = True
  Dim coll As NotesDocumentCollection
  Set coll = db.AllDocuments
 
  Set doc = coll.GetFirstDocument
 
  While Not(doc Is Nothing)
    i = 0
    If doc.FolderReferences(0) <> "" Then 'doc is in at least one folder, so pull it from this collection
      Call coll.DeleteDocument(doc) 'just pulls it from the folder)
    End If
    Set doc = coll.GetNextDocument(doc)
  Wend
  Call coll.PutAllInFolder("Lost Documents") 'all those that remain in the collection
End Sub


How do you export to an OpenOffice Calc spreadsheet?

From Frank Strunzkus:


This example goes through a notes view and exports some fields of each notes document into a table row in openoffice calc.

You can choose if the user should be able or not to see the OpenOffice application while the export agent is running. Once the OO file is ready it will be saved to harddisk.

My example requires a oo calc file that will be used as a template. This template will be filled with data comming from notes. (Google for examples, if you prefer to create a empty file rather than using a preformatted one like I prefer.)

To test my demo you first need to create the template file on your C: drive. Create a simple empty .ods file. My example requires that there is a at least one table in the file that has the name "Sheet1".

Option Public
Option Declare

------------------------------------------

Class OOProperties 

'I found this class in the OpenOffice forum and found it very usefull. Thanks for sharing it!

'This clase can be used to pass properties to OO Objects
'E.g. pass the Hidden=True property to the app object to run the application in the background
'If you do not have to set properties, you do not mandatory need this class in your code

Private vProp() As Variant 
Private app As Variant 
Private vStruct As Variant 
Private bInz As Integer 

Sub new() 
  Set App = createobject("com.sun.star.ServiceManager")
  Set vStruct = App.Bridge_GetStruct("com.sun.star.beans.PropertyValue") 
End Sub 

Sub addProperty(sName As String, vValue As Variant) 
  If bInz Then 
    Redim Preserve vProp(Ubound(vProp) + 1) 
  Else 
    Redim vProp(0) 
  End If 
  bInz = True 
  vStruct.Name = sName 
  vStruct.Value = vValue 
  Set vProp(Ubound(vProp)) = vStruct 
End Sub 

Property Get Values() 
  If Not bInz Then 
    Me.addProperty "Dummy!", 0 
    bInz = True 
  End If 
  Values = vProp 
End Property 

End Class

------------------------------------------

Sub Initialize
  Dim session As New NotesSession
  Dim ws As New NotesUIWorkspace
  Dim fileOo As String

  Dim args() As Variant

  Dim prop As New OOProperties 

  Dim App As Variant
  Dim objCoreReflection As Variant
  Dim objDesktop As Variant
  Dim objDocument As Variant
  Dim objSheet As Variant
  Dim cell As Variant

  Dim db As notesdatabase 
  Set db = ws.CurrentDatabase.Database

  Dim view As NotesView 'The notes view that contains the data to export
  Set view = db.GetView("allpersons")

  Dim doc As NotesDocument 'A notes document that contains data to be exported
  Set doc = view.GetFirstDocument

'The filename of a file that should be used as a template. 
'Using a template allows you to define columnheaders, set colors and add logos etc. in advance.
'You can even prepare charts that display your data from Notes graphically
'I normany use a function to export the template file from my notes database to the filesystem first.
'Remember that Openoffice uses / not \ you might have to convert your filepath. 
  fileOo = "C:/MyEmptyTemplateFile.ods" 

'Create objects that are required to work with openoffice
  Set App = createobject("com.sun.star.ServiceManager") 'The servicemanager

  Set objCoreReflection= App.createInstance("com.sun.star.reflection.CoreReflection")
  Set objDesktop = App.createInstance("com.sun.star.frame.Desktop") 'The main desktop object

  prop.addProperty "Hidden", True 'Decide to run Openoffice hidden in background or visible to the user

  Set objDocument = objDesktop.loadComponentFromURL("
file:///"+fileOo,"_blank", 0, prop.Values) 'Load the file

  Set objSheet = objDocument.Sheets.getByName("Sheet1") 'Define which Sheet to process. This sheet must exist in the template

  objDocument.CurrentController.setActiveSheet(objSheet) 

  Dim rowposition As Integer 'current spreadsheet row
  Dim colposition As Integer 'current spreadsheet column

  rowposition = 3 'Note that the array starts at 0, to adress the first spreedsheet row 1 set rowposition = 0

  While Not doc Is Nothing 
    colposition = 0

    Print "Preparing Spreadsheet, please wait! Processing "+ doc.Lastname(0)

    Call InsertSpreedsheetCellValue (objSheet, colposition ,rowposition, doc.Firstname(0))
    Call InsertSpreedsheetCellValue (objSheet, colposition ,rowposition, doc.Lastname(0))

    rowposition = rowposition+1
    Set doc = view.GetNextDocument(doc)
  Wend
  Call objDocument.Store
  Call objDocument.close( True )

  Msgbox "Your file is ready! "+fileOo

End Sub

------------------------------------------

Sub InsertSpreedsheetCellValue (objSheet As Variant, colposition As Integer, rowposition As Integer, fieldvalue As String)

  Dim cell As Variant
  Set Cell = objSheet.getCellByPosition(colposition, rowposition)
  Cell.String = FieldValue
  colposition = colposition+1

End Sub


How do you open a File Dialog in LotusScript?
Use the OpenFileDialog and SaveFileDialog methods in the NotesUIWorkspace class.

How do you edit a rich text field in an open document and redisplay it?
From Andre Guirard:

Dim wksp As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument, uidocNew As NotesUIDocument
Dim doc As NotesDocument
Dim rti As NotesRichTextItem
Dim strFieldname As String

Set uidoc = wksp.CurrentDocument
uidoc.Refresh True ' do this if the rich text field is editable, to get the current contents in case user has modified them.
Set doc = uidoc.Document �' get the back-end document for the document open on screen.
strFieldname = uidoc.CurrentField ' remember the current field if any
Set rti = doc.GetFirstItem("fieldname") ' insert your fieldname here, generally "Body"

' Make your rich text changes here, for instance:
Call rti.AddNewLine(1, True)
Call rti.AppendText(Now & ": log entry.")
If session.NotesBuildVersion >= 190 Then
rti.Update ' ND6 only
Else
Call doc.ComputeWithForm(True, False) ' caution, as this may erase some field values if you have @Db functions in formulas.
End If

doc.SaveOptions = "0" ' make it possible to close the document without a "do you want to save" prompt. If this is a mail-in doc you may need to set MailOptions="0" also to avoid being prompted.
Call uidoc.Close
Set uidocNew = wksp.EditDocument(True, doc, , , , True)
Delete uidoc
uidocNew.Document.RemoveItem("SaveOptions")
If strFieldname <> "" Then uidocNew.GotoField(strFieldname) ' return focus to field that was current before.

Note: this will cause Queryclose, Queryopen, Postopen (and so on) form events to trigger. Also, uidoc.Refresh will execute computed field formulas and input validations, so you should write the validation formulas to not return @Failure unless @IsDocBeingSaved | @IsDocBeingSent is true.


How do you find out if there is default view?
From Jens Winkelmann:

Dim docDefault As NotesDocument
Set docDefault = db.GetDocumentByID("FFFF0008")
If docDefault is Nothing then
'// default view does not exist else
'// default view exist end if


How do you scan an image into a rich text field using a button?

From Jamie Magee at www.MartinScott.com:

In a button next to the RT field named Body:
@Command([EditGotoField]; "Body");
@Command([EditInsertObject]; "Image Document")

In place of "Image Document" (which is installed with my Win2k by default) you could use the OLE object type name of any installed scanner program on your workstation. If it's TWAIN compliant, and if your scanner is, too, then the software will work with the scanner. To see OLE object type names, just do Create -> Object... from the Notes menu while the cursor is in a RT field. They appear in the list.

Most imaging programs launched in New object mode automatically prompt you to scan whatever's on the bed/feeder, so then the user is just one click away. You can sometimes default production-grade imaging programs to automatically scan without prompting upon startup.


How do you unlock a document
If a document is locked (an R6 feature), you can unlock it by running an agent with this formula:

FIELD $Writers := @DeleteField;
FIELD $WritersDate := @DeleteField; 


[<a name="NT000009C6">
Companies with Notes Applications</a>]

* GroupQuest Software
* Application Partners
* Groupware Technologies
* Cambridge Software Group
* Ives Development (makers of the TeamStudio Design System, application development tools for Lotus Notes and Domino; they also make Caio!, a revision control system for Notes; they also make Delta, Configurator, Design Manager, Profiler, Snapper, and Validator)
* Candle/Cleversoft
* Mayflower Software
* Casahl Technology
* Brainstorm Technologies
* QDM
* Binary Tree (makers of BT Migration Suite and eTeam)
* Solutions By Design (makers of NavMaker, a Notes Navigator editor)
* Business Evolution (makers of InteractPro, a Java chat environment for Domino)
* AppJunction
* Technovations International (makers of Notes capacity planning tools)
* Extracomm Technologies (makers of ExtraFax)
* G2 Associates (makes of ProActive Assistant, a Notes stress-testing tool)
* Genii Software (makers of the Midas Rich Text LSX)
* Metaware bv
* Surety Technologies (makers of Digital Notary Accelerator for Lotus Domino)
* GSX Groupware Solutions (makers of the GSX Administration Suite)
* GlobalServe (makers of PageMe! pager gateway and Sales Accelerator: Contact
Management System)
* xorTech Systems (makers of InfoSync, a client replication admin tool)
* ErgoTech (makers of Act! For Notes)
* Greyfriars Consulting Group, Inc. (makers of Domino business components)
* DPI Services (makers of QMX, quality management software)
* DataMirror (makes of a Notes/ODBC replication tool)
* GFI (makers of FAX gateway, Workflow and Internet gateway software)
*
CommVault (makers of CommVault for Notes, a doc-level backup program)
* ProjectEdge (makers of a construction project management application)
* Jagre (makers of version control and change management software)
* DominoAnalyzer (makers of web security analysis software)
* Cassetica (makers of GroupManager, CCI, NotesMedic)
* Sorites (makers of mailing list and survey software)
* SoftVision makers of NotesToPaper (a reporting tool) and n2pdf (a tool to convert Notes content - including links - to the pdf format)
* Colligo (makers of Lotus Notes Workgroup Edition, that lets Notes clients replicate with each other directly)


Sources of Notes API Information

* Rick Gansler's Mac API Presentation
* Lotus' Developers' Page


Local User Groups

* WALNUT
* WALNUT Canberra, Australia
* Wisconsin Notes User Group
* Charlotte Lotus Notes User Group (in North Carolina)
* St. Louis Domino Notes User Group (in Missouri, USA)
* Washington, DC Notes User Group
* GRANITE (Notes User Group in Chicago)
* NUTS (Notes User Group for Ohio, Kentucky, Indiana)
* Atlanta Lotus Notes Users Group
* New England Domino and Notes Special Interest Group
* IBM's Notes User Group List


Notes Related Web Sites

Lotus' Notes Knowledgebase can be queried here. This is a great place to search for known bugs and workarounds that Lotus recommends.

These are all Domino Discussions:
* Lotus Domino Discussion
* Lotus Japan Notes Dicussion

Other Sites from Lotus and Iris Associates:
* Lotus Domino Wiki
* Lotus Development Corp. Home Page
* Lotus' Developer Central
* Notes.ini Settings

Other good Notes web sites:
* XPages Info site
* Frank Cseh's Notes Page
* European Notes Page
* Rose Kelleher's (a great book author) Notes Stuff
* Notes Design & Development
* Lotus Notes Job Listings
* E-Pro Mag
* Notesnet.Com
*
Domino Security news
* Domilock (Domino web security checking tool)
* Breaking Par (Domino web hosting and free code snippets)
* Emie's Notes Links
* DRCC Notes.ini Reference
* SearchDomino
* Notes WikiFAQ
* Domiclipse (lets you write/debug Java agents using Eclipse)
* Open Source Quickplace Templates from SNAPPS
* Domingo (Java Notes API w/o needing recycle calls)
* Ext.ND (Web 2.0 extensions for Domino)
* Lotus Notes is Cool
* XPage Sample Apps and Controls


Mirrors Sites for the Notes FAQ

The following sites mirror this FAQ site:
* KEY Enterprise Solutions


Non-Notes Web Sites

* Notes Icon Catalog
* Icon Bazaar


What Notes Related RSS Feeds Are There?

* Lotus has a Support RSS feed that updates you on any technote changes.
* Ed Brill has a Blog that has an RSS feed.
* InsideLotus weblog