Lotus Notes FAQ Visit Our Sponsor!

Lotus Notes Frequently Asked Questions
(Notes/Domino 8.5)

A. Administration Tips


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

2. How do you find out which DAOS files a database is using?
3. How Do You Rebuild Busytime?
4. How Do You Fix the "Error connecting to server " Error?
5. How do you upgrade the database ODS?
6. How do you see if Traveler is still resyncing user data?
7. How do you import a wildcard domain certificate into Domino?
8. How do you change the number of DAOS NLO's per directory?
9. Can you run the NotesSQL ODBC Drivers on 64-bit Windows?
10. How do you send Server crash reports to IBM automatically?
11. Can you hide the failover prompt?
12. Does "Optimize document table map" Cause View Index Corruption?
13. Why does the server process use 100% cpu time on Linux?
14. Why does the catalog task show this error: "Unable to replace obsolete catalog. The name is not in the list"?
15. Why do I get the "Maximum allowable documents exceeded for a temporary index" in the Notes Log?

B. Domino


1. Why Don't Domino's Java Applets Show Up for Mac Web Browsers?
2. How do you control what is used to edit a rich text field on the web?

C. Education and Training


1. Learning Plug-In

D. Programming Tips


1. How do you delete a profile document?
2. How do you calculate the week number in a year of a given date?
3. How do you disable NSD so exceptions go to Visual Studio?
4. How do you disable generation of tags?
5. Why is my XPages upload size restricted to 1MB?
6. Why does my C API program crash when running on 64-bit Windows?
7. What causes "Entry Not Found In Index" Errors?

E. Programming Tips - LotusScript


1. How do you edit a rich text field in an open document and redisplay it?
2. How do you find out if there is default view?

F. Web Sites


1. Notes Related Web Sites


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.


How do you find out which DAOS files a database is using?

"tell daosmgr listnlo missing somefile.nsf" gets a list of the NLO files that somefile.nsf references but are not in the repository

"tell daosmgr listnlo all somefile.nsf" lists all of the referenced NLO files


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.


How do you upgrade the database ODS?

The Notes 8 and 8.5 ODS (object data store...aka, NSF file) do not use the latest version by default. The 8.x version lets you compress design elements and data to save disk space and also use DAOS (8.5) to save space for attachments. Lotus does not enable the new ODS when you install the server because some backup and antivirus programs don't know what to do with the new format.

If you want the 8.5 ODS, add "Create_R85_Databases=1" to your notes.ini file for the server.
If you want the 8.0 ODS, add "Create_R8_Databases=1" to your notes.ini file for the server.
These switches will let Domino create databases in the new format for new databases.

To convert existing databases to the new format, you have to run the compact command using these parameters:
-c (copy style compact)
-n (design compression)
-v (data compression)
-daos on (to pull attachments out of the NSF and into DAOS -- assuming DAOS has been configured on the server document).

The command line would be (run it from the command line to convert names.nsf and log.nsf and other databases the server might be using at the time:

[n]compact -c -n -v -daos on 


How do you see if Traveler is still resyncing user data?
In the server console, type "tell traveler log syncml on". This enables logging of the data.
In the traveler\logs\syncml directory, you'll see *_Ping_in.xml files to indicate that a user's device is pushing data.


How do you import a wildcard domain certificate into Domino?

From Ninke Westra:

Create a server keyring (.kyr) file, for example using the certsrv.nsf database that's present on just about every server, doesn't matter if it's on the server that you want to use the keyring with or not since the keyring file is created locally to your client, not on the server.

Select Create Key Rings & Certificates in the navigator and click 1. Create Key Ring
Under Keyring informationyou enter the filename (keyring.kyr) and password that you want to set for this keyring file.
For Keysizeyou can select a keysize that will be used when creating certificate requests using this keyring.
Disinguished Name has some mandatory fields
�� Common Name���your server's fully qualified hostname (when generating a certificate request or *.domainname for a wildcard request
Organization��������� Organisation name
� Organizational Unit
��� (optionall)
��� City������������������������ (optional)
��� State��� ����������������� Province/State
��� Country���������������� Two letter country code.

The next step is 3. Install Trusted Root Certificate into Key Ring
Enter Certificate Information an identifying label for the certificate signer's certificate
You can choose to either import the root certificate from a .crt/.cer file or paste from clipboard.
Click Merge Trusted Root Certificate into Key Ring
Enter the password you picked at step 1. (create key ring)

To import existing wild card certificates (pcks12 format, .pfx/.p12 file) into a Domino keyring file you need IBM's [ftp] GSK5 IKeyMan.
(I read somewhere that this tool might not work in Windows 2003/Vista+ but I can not confirm that).

Extract the gsk5-ikeyman.zip file into a directory that has no spaces in the name (I used C:\gsk5)
Start the command line shell, change directory to the directory where you extracted gsk5 to and execute the following command: gskregmod.bat Add
Next run IKeyman by executing runikeyman.bat.
Open the keyfile.kyr file that we created earlier and enter the keyring password.
Select Personal certificates and click Import

Select the wildcard certificate file (.pfx/.p12) and enter the certificate's password.

Shutdown IKeyman and copy the keyfile.kyr and matching keyfile.sth� to your Domino server's data directory.

Configure your Domino server to use this keyring file and restart the http task (or restart domino).


How do you change the number of DAOS NLO's per directory?
The DAOS attachment file storage area stores attachments in subdirectories. The default is 40000 files per directory. This limit can be changed using this notes.ini variable:

DAOS_MAX_FILES_PER_SUBCONTAINER=40000
It requires a server restart if you change it and will only affect the current DAOS subdirectory (older subdirectories are not changed). This will also affect the maximum number of files in the DAOS store which is currently this values multiplied by 1000 (this value is not configurable currently).


Can you run the NotesSQL ODBC Drivers on 64-bit Windows?
The NotesSQL driver is a 32-bit ODBC driver, so you have to register it as such

ODBC on running on a 64-bit-based operating system has two sets of system DSN settings stored in the Windows Registry.
32-bit client applications use the 32-bit settings. 64-bit applications use the 64-bit settings.

If you run "%SystemRoot%\SysWOW64\odbcad32.exe", you modify the 32-bit settings.
If you run "%SystemRoot%\system32\odbcad32.exe", you modify the 64-bit settings (this is the one run from the Control Panel --> Administrative Tools --> Data Sources --> ODBC).

You must register the System DSN for the ODBC32 drivers with SysWOW64\odbcad32.exe.


How do you send Server crash reports to IBM automatically?
In the notes.ini for the server, set
Crash_SendToIBM=1

IBM will get the fault reports automatically so they can analyze them and prioritize fixes for the text maintenance release or hotfix.


Can you hide the failover prompt?

As of Notes 8, you can. Add
HidePromptFailoverInc=1
to the Notes users' notes.ini and the Notes client will automatically fail over to the next server in your cluster.


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 does the server process use 100% cpu time on Linux?
There was a kernel change in roughly 2.6.37 that causes statistics to suck 100% of CPU time, even though the system is lightly loaded.

You can disable this by adding this to your Notes.ini and restarting the Domino server.
PLATFORM_STATISTICS_DISABLED=1

Thanks to Oliver Regelmann for getting this from Lotus support.


Why does the catalog task show this error: "Unable to replace obsolete catalog. The name is not in the list"?
Make sure that LocalDomainCatalogServers is in the ACL of the catalog.nsf Database Catalog as Editor and Server Group. If it's not there, the catalog task can't update the documents in the database and puts up this cryptic error :-P

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.


Why Don't Domino's Java Applets Show Up for Mac Web Browsers?
For some reason, this is disabled by default in all Domino installations (as of this FAQ, at least to 8.5.2FP1).
Check the domino/data/browser.cnf file. You'll see a section for the Java editor applet as follows:

## DisableEditorApplet - Boolean indicating whether browser can handle the Editor Applet
Property DisableEditorApplet Boolean False
Rule True MSIE [0-9].*\; Macintosh # IE on MAC platform
Rule True MSIE [0-9].*\; Mac_PowerPC # IE on MAC platform
Rule True ^Mozilla/[0-9].*\(Macintosh # Netscape on MAC platform
Rule True ^Mozilla/[0-9].*\(Mac_PowerPC # Netscape on MAC platform
Rule True Notes # Notes browser

Change the two highlighted values from True to False to enable Java applets for Firefox on the Mac.


How do you control what is used to edit a rich text field on the web?

There is a wiki article that describes how to use the Best Fit option.

Note that you have to modify your browser.cnf article in 8.5 because it was shipped with settings that disable the Java editor for Safari/Chrome.


Learning Plug-In

Lotus has created a learning plug-in for Lotus Notes 8+ (Standard/Eclipse client only).

How do you delete a profile document?

You have to use LotusScript:

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


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 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.


How do you disable generation of tags?
The <span> tags are generated on XPages because Domino is trying to generate styling markup.

You can disable this in one of two ways:
a) In the Properties view on the Style tab, activate "Disable runtime-applied default styles"
b) Make sure that no properties for the browser frontend (like class or style) are set


Why is my XPages upload size restricted to 1MB?
Even if you have your server's HTTP Protocol settings set up to allow greater than 1MB uploads, you also have to change the xsp.properties file thata XPages uses.

Edit your xsp.properties file (this is in your <dominohome>\xsp\nsf and\or <dominohome>\data\properties directories). In the 'FILE UPLOAD' section of this file change the value of 'xsp.upload.maximumsize' from the default of '1024' (this value is in KB) and then restart your http server task.

Why does my C API program crash when running on 64-bit Windows?

From Daniel Nashed:
Domino 7.0.2+ supports Windows 2003 64bit and can leverage more than 2 GB memory for local + shared memory.
What is still not widely known among ISVs is that you need to link your applications in Visual Studio with a new flag called /LARGEADDRESSAWARE. The flag allows a program to use more than 2 GB of memory (shared + local). Without this flag an application crashes when the 2 GB memory limit is reached. The Notes API samples up to 8.5 don't use this flag and they should.

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.


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


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