Personal Blog of Thomas Hampel - Creative Mythbusting in Development and Collaboration

Who am I?


Query results for : Development

HCL Domino Marketplace - submit your apps, products, solutions, and templates NOW- 19 December 2023 - (0) Comments

Thomas Hampel
 19 December 2023

Dear HCL Domino Community, Developers and Partners,

Earlier this year at the
Collabsphere conference, we announced to be working on our brand-new HCL Domino application marketplace/appstore, and we want YOU to be a part of it!
We believe that your applications deserve a spotlight, and our new marketplace is the perfect platform for you to showcase your work to a wider audience.

Here are a few reasons why you should consider submitting your applications to our marketplace:

Increased Visibility:

The new Domino marketplace is designed to attract current and new customers, tech enthusiasts, and industry professionals.
By featuring your applications here, you'll get the exposure your work deserves.

Our courtesy to your HCL Domino investment

Having your application listed is free of charge.
All we need is some information about your app such as name, description, sreenshots.

Improving adoption

Even if your application or tool is a non-commercial asset you have developed, submitting it to the Domino marketplace will grow your user base and reputation.

Receive valuable feedback from users and improve your applications based on real-world usage. This iterative process can lead to enhancements and optimizations you might not have considered.

Submitting your application is easy!

Simply follow these steps:

1. Start here:
2. Log in with your existing HCL ID / Partner credentials, or create a new account as needed.

3. Click on "Domino Submission"

Image:HCL Domino Marketplace - submit your apps, products, solutions, and templates NOW
4. Fill in the required information about your application.

Please note, there are two type of applications:
- Products, which are commercial Domino applications, addons, templates, etc.
- Templates, which are non-commercial templates you want to make available for download at no charge.

5. Upload any necessary screenshots, provide the metadata required

6. Hit submit, and you're done!

Here you can find a more detailled description of each field and how to fill the form.

We can't wait to see the amazing applications you've developed and share them with the world.
If you have any questions or need assistance during the submission process, please let me know

Thank you for being a driving force in the world of the Domino technology!

Running HCL Domino Designer in your browser?- 20 September 2023 - (0) Comments

Thomas Hampel
 20 September 2023

Hot on the heels of our HCL Nomad for Web V1.0.9 Gold Release, we have deployed the next Pre-Release of HCL Nomad for web into our Sandbox Environment !
We have updated the environment and are inviting you to try out the latest version (V1.0.10.5384-3229).

This Pre-Release of V1.0.10 includes a VERY important new piece of functionality - HCL Domino Designer in your browser!

Yes, you read that correctly! You now have the ability to launch the HCL Domino Designer in your browser - just like you do with the HCL Nomad for Web client.
You will have the ability to make design changes to your HCL Domino applications without having the HCL Domino Designer client installed onto your computer!

Like the installable Domino Designer client, this browser based Designer allows to manage design elements like forms, @formulas...
Image:Running HCL Domino Designer in your browser?

...views, pages...
Image:Running HCL Domino Designer in your browser?

...LotusScript Agents and Script Libraries (including the LS Debugger)
Image:Running HCL Domino Designer in your browser?

and a lot more of what you expect from your well known Domino Designer.
Since it runs in the same context as Nomad, the same restrictions will apply - meaning there is no Java and so it wont be possible to build XPages or Java code with it.

Personal note:
A remarkable improvement compared to the classic Notes Client is the properties dialog which now is a sidebar and longer is a free floating window. Hope you like it as much as I do?
Image:Running HCL Domino Designer in your browser?

Interested in trying this new Designer yourself?

Just head over to the HCL Nomad Sandbox and create an account or log in to get started.
Image:Running HCL Domino Designer in your browser?

Within the Sandbox environment we have a number of Domino Sample Applications for you to use while in the HCL Nomad Sandbox.

In order to easily access these Sample Applications we have modified the Feedback Forum to now have the ability to add the Icons to your Workspace for you.

To access the Feedback Forum, follow these steps:

1. Log into the HCL Nomad Sandbox

2. From the "Recent Applications" page, click on "Open Application" in the top-right corner of the page

3. In the "Look in" field, select "NomadWeb/SandboxBeta" as the Domino server

4. Scroll through the list of applications until you locate "Nomad for Web Browsers Feedback" and double click on that entry

Once you have the Feedback Forum open, you will see a new entry on the left navigator titled "Deploy Sample Apps".
When you click on that option, five (5) Sample Applications will be added to your Workspace.


Admin Client - custom icons for each domain?- 10 June 2023 - (0) Comments

Thomas Hampel
 10 June 2023

When you have to manage multiple Domains in your Admin client, finding the right domain
This example here is just showing two Domino Domains, but there are admins out there with 100+ domains to manage.
Maybe you want some custom icons then?

Image:Admin Client - custom icons for each domain?  Image:Admin Client - custom icons for each domain?

Those icons displayed on the left side are nothing else than an Outline stored in the bookmark.nsf application on your client.
Of course you could edit the design manually:

First you need to upload the preferred icon image as an image resource, then you can edit  the Outline called "AdminBookmarkOrder"

Image:Admin Client - custom icons for each domain?

to select the image of your choice

Image:Admin Client - custom icons for each domain?
Even better if you can do this with a small script:


     Created Jun 10, 2023 by Thomas Hampel

     Description: Comments for Agent



Dim s As New NotesSession
Call SetAdminBookmarkImage ("INTERN", "HCL Domino_Color_Icon_32.png")


     Function AdminBookmark

     Description: Comments for Function


SetAdminBookmarkImage (DomainName As String, ImageName As String) As Boolean
Dim outline As NotesOutline
Dim oe As NotesOutlineEntry
     SetAdminBookmarkImage =
'# open Bookmarks.nsf locally
Dim db As New NotesDatabase ("", "bookmark.nsf")
If Not db.isopen Then
Print "Unable to open bookmark.nsf"
Exit function
End If
'# get Outline
Set outline = db.GetOutline("AdminBookmarkOrder")
Set oe = outline.GetFirst()

'# first Outline entry level (must) have label "($Admin)"
If oe.Label = "($Admin)" Then
'# step one level down
Set oe = outline.Getchild(oe)
'# loop all children
While Not oe Is Nothing

If (oe.Label = DomainName$) Then
'# set imageName
Print "Changing bookmark icon image of " & oe.label & " to " & ImageName$
                             oe.Imagestext = ImageName$
Call Outline.Save()
End If
Set oe = outline.Getnextsibling(oe)
End If
     SetAdminBookmarkImage =

The Bad News:

Your customizations will disappear when you refresh the list of servers.

Good news:

1. In Domino V14 you'll have
Admin Central, a new Domino application to manage your environment, where each Domain will be one database icon on your workspace
2. After refreshing the list of servers you could just run the script again.



Developers: New C API Toolkit 12.0 is available now- 2 September 2021 - (0) Comments

Thomas Hampel
 2 September 2021

Again: good news for developers and partners out there who work on plugins and extensions for Domino.
We just published the V12 version of the C API Toolkit for Domino and Notes:

Image:Developers: New C API Toolkit 12.0 is available now
Interesting side note: after 7 years without any new release, HCL published two major releases of the toolkit just in one year.

This new version provides a number of new API calls and -as promosed- provides the make files and MSVS project files
developers were looking for.
You can find the new V12 C API Toolkit in the Domino V12 server product category on Flexnet Downloads

Image:Developers: New C API Toolkit 12.0 is available now


Developers: New C API Toolkit 11.0.1 now available- 8 February 2021 - (0) Comments

Thomas Hampel
 8 February 2021

Good news for developers and partners out there who work on plugins and extensions for Domino.
We just published a new version of the C API Toolkit, actually the first new version since more than 7 years.

This is the first HCL shipment of the C API and it signals an ongoing commitment to revamp the C API delopment story,
it now supports building applications using the GUI environment for Visual Studio 2017.

However, as
Ulrich Krause already highlighted in his blog it does contain just a very few new API calls yet, also make files were removed because they did not work anymore.
HCL's development team is working on a V12 version of the C API Toolkit that will be providing make files and MSVS project files again. This version 12 will be provided after Domino V12 has shipped.

You can find the current/updated C API Toolkit in the Domino server product category on
Flexnet Downloads

Image:Developers: New C API Toolkit 11.0.1 now available


Improving the Mail Template 9.0.1FP9 - Manage Return Receipts according to RFC 2298- 19 September 2017 - (0) Comments

Thomas Hampel
 19 September 2017

According to RFC 2298 it is recommended to show a dialog box where the recipient of a mail can decide weather or not a return receipt shall be sent back to the originator of the mail. This behavior is not currently part of the Standard IBM Mail template.

To add this feature you have to modify the following design elements:
  • Form “Memo”, Event "QueryOpenDocument", added the code shown below
  • Form “Reply”, Event "QueryOpenDocument", added the code shown below
  • Form “ReplyWithHistory”, Event "QueryOpenDocument", added the code shown below

Insert this code at the end of the QueryOpenDocument event.

Set doc = Source.document
If Source.isNewDoc Then
        '# don' t do anything, as this is a new document
        If doc.GetItemValue("ReturnReceipt")(0) = "1"  And doc.HasItem ("DeliveredDate") Then
                If MessageBox ("The sender of this message has asked to be notified when you read this message." & Chr(13) & "Do you wish to notify the sender?", 36, "Send Return Receipt?") = 7 Then
                        Call doc.ReplaceItemValue ("ReturnReceipt", "0")
                        Call doc.Save(True, False, true)
                End if
        End If
End If


Git Push Error : RPC failed; curl 56 SSLRead() return error -9806- 21 September 2016 - (0) Comments

Thomas Hampel
 21 September 2016

I am using Git for version control of software projects I am working on.
Recently I wanted to push the changes I've made to a Domino template my git client responded with the following error:

error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly

To cut a long story short : this problem was caused by using HTTP(S) for pusing changes to the git server. After changing to SSH, everything worked fine again.

Root Cause for ’Type mismatch in method OP_UNARY’- 21 March 2016 - (0) Comments

Thomas Hampel
 21 March 2016

Quickly creating a mail with Buttons containing LotusScript can cause headaches.
It just takes a few lines of code for running into undocumented error messages here is a small example:
Image:Root Cause for ’Type mismatch in method OP_UNARY’
will result in:
Image:Root Cause for ’Type mismatch in method OP_UNARY’

Changing "if not ..." to "is ..." like shown here
Image:Root Cause for ’Type mismatch in method OP_UNARY’
will result in a slightly different error message "Type mismatch in method IfCoerceBool: Unknown found, Uknown expected"
Image:Root Cause for ’Type mismatch in method OP_UNARY’
Do you spot the problem???

What is the root cause?

The property "IsNewDoc" acutally is a property of NotesUIDocument but is not a valid property of the NotesDocument class.
For testing if a NotesDocument is a new document, use the property IsNewNote
When creating a new button within the body of a new mail, Option Declare is not enabled by default like it is in the Designer client, so the error was not detected when saving the source code.
with Option Declare enabled its easier to spot the problem...
Image:Root Cause for ’Type mismatch in method OP_UNARY’


Mindoo FTP Server stopped running in Domino- 23 July 2015 - (2) Comments

Thomas Hampel
 23 July 2015

The Mindoo FTP Server project provides an FTP server wrapped into an XPages application. It is based on the Apache FtpServer which runs as OSGi plugin on the server side.
One day a customer reported the FTP server would no longer work. A quick check showed that port 21 does not respond any longer.

Restarting the HTTP task showed a JVM Exception
restart task http
17.07.2015 18:00:07   HTTP Server: Using Internet Site Configuration View
17.07.2015 18:00:12   JVM: Java Virtual Machine initialized.
17.07.2015 18:00:12   HTTP Server: Java Virtual Machine loaded
17.07.2015 18:00:16   XSP Command Manager initialized
17.07.2015 18:00:17   HTTP JVM: java.lang.reflect.InvocationTargetException

Checking the OSGI bundles showed the required bundle is not even installed.
> tell http osgi diag com.mindoo.ftp
Cannot find bundle com.mindoo.ftp.


Check the file [DominoData]\domino\workspace\logs\error-log-0.xml for any problems
the very first warning in this file showed that a plugin was not loaded because the signer does not have the required access rights
CLFAD0331W: NSF Based plugin contribution denied because signer CN=SignerName/OU=Unit2/OU=Unit1/O=OrgEU does not have required access: CN=SignerName/OU=Unit2/OU=Unit1/O=OrgEU:System\UpdateSiteServer.nsf

and further down in the same file:
CLFAD0334W: Feature com.mindoo.ftp_feature_1.0.0.201306221322 skipped

At the first access rights seemed to be ok, but when looking a little closer I have found the user name does not have access to the server any longer because the Organization was renamed from "OrgEU" to "Org"

Solution (Part1)

The signature which is being used here is not a signature of a design element, it is the content of the Eclipse Update site which still had the old signature referenced. So how are we going to fix this?
  • Open the Eclipse UpdateSite and use "Actions\Sign All Content"
    Remark: This will not sign any design elements - it will sign the documents in the application only.
    Image:Mindoo FTP Server stopped running in Domino
  • Restart the HTTP task
    restart task http
  • Watching the server console
    Image:Mindoo FTP Server stopped running in Domino

Image:Mindoo FTP Server stopped running in Domino

Running into another problem

Although the FTP Server was running again, it seems like there still was an issue with the XPages application.
Quickly looking into  [DominoData]\domino\workspace\logs\error-log-0.xml showed a well known problem.
Image:Mindoo FTP Server stopped running in Domino

Solution (Part2)

Obviously someone did open the Application in Domino Designer without disabling the option to recompile xPages automatically.
So make sure this option is set to "Manually recompile Xpages"
Image:Mindoo FTP Server stopped running in Domino

and then open the Mindoo FTP Domino application in Domino Designer and hit "Project\Build Project" in your Designer client.
Image:Mindoo FTP Server stopped running in Domino

Testing results
  • Opening the Mindoo FTP Application from a browser seems to work
    Image:Mindoo FTP Server stopped running in Domino
  • "tell http osgi mftp status" shows that our server is now running on port 21
    Image:Mindoo FTP Server stopped running in Domino
  • Opening an FTP connection from a remote client is working fine

Source Control in Domino Designer 8.5.3- 10 October 2012 - (0) Comments

Thomas Hampel
 10 October 2012

Trying to set up a new machine with Domino Designer 8.5.3 and Source Control (SVN) based on this Blog post from Niklas Heidloff unfortunately was not working as expected.
It seems like the
Eclipse Update site for GEF which was refernced in his blog post was not available any longer.

> CWPPR0031: The requested provisioning operation(s) completed with partial success.

> Error parsing site stream. [The XML stream is not a valid default "site.xml" file. The root tag is not site.]

Image:Source Control in Domino Designer 8.5.3

A quick search brought me to the an update site hosting the
older versions recommended, adding it to the Application Locations fixed this small problem.
Image:Source Control in Domino Designer 8.5.3

Although this is one way to make it work, the most simple way is to make use of a ready-built Update Site from OpenNTF, see this project
Basically you need to download & unzip this file to your loal disk, and point the application installer to this update site.

Happy coding!

Exporting Notes Documents- 2 October 2012 - (1) Comments

Thomas Hampel
 2 October 2012

A customer wanted to have all attachments of some selected Notes document exported to the file system and also wanted to keep an option for developers to access the metadata of the original Notes document.
Nothing easier than that, so I wrote this small script to get the job done.

First the entire document is exported into DXL, then all attachments are detached to the file system. Both parts are not rocket science, but some people might want to reuse the code.
To avoid name conflicts while detaching files a folder is created for each Notes document so all attachments of this Notes document will be stored in this subfolder.

Dim s As New NotesSession
Dim coll As NotesDocumentCollection
Dim BasePath$

      BasePath$ =
InputBox ("Export data to path...: ", "Export", "C:\")
'# add backslash at the end
If right (BasePath$,1) <> "\" Then BasePath$ = BasePath$ & "\"
Print "Using BasePath : " & BasePath$
Set coll = s.currentdatabase.Unprocesseddocuments
If coll Is Nothing Then
MessageBox "No documents selected"
Print "Processing " & coll.count & " documents..."
Call ExportToDXL (coll, BasePath$)
Call ExportToFile (coll, BasePath$)
MessageBox "Export completed."
End If        

ExportToDXL (Coll As NotesDocumentCollection, BasePath As String)
Dim session As New NotesSession
Dim stream As NotesStream
Dim DXLfilename$
Dim doc As NotesDocument
Dim tdoc As NotesDocument
Dim exporter As NotesDXLExporter
If coll Is Nothing Then Exit function
Set doc = coll.getfirstdocument
While Not doc Is Nothing
Set tdoc = coll.getNextDocument (doc)
'# Open xml file named after current database
Set stream = session.CreateStream
              DXLfilename$ = BasePath$ & doc.universalid &
If Not stream.Open(DXLfilename$) Then
MessageBox "Cannot open " & DXLfilename$,, "Error"
Exit Function
End If
'# kick off the exporter process
Set exporter = session.CreateDXLExporter
Call exporter.SetInput(doc)
Call exporter.SetOutput(stream)
Call exporter.Process
Set doc = tdoc

ExportToFile (coll As NotesDocumentCollection, BasePath As String)
        On Error GoTo ErrH
        Dim doc As NotesDocument
        Dim tdoc As NotesDocument
        Dim rtitem As variant
        Dim targetpath$, fname$
        Dim FieldList(0) As String
        Dim oba As Variant
        '# define which fields to scan for attachments
        FieldList (0) = "Body"
        If coll Is Nothing Then Exit Function
        Set doc = coll.getfirstdocument
        While Not doc Is Nothing
                Set tdoc = coll.getNextDocument (doc)
                If doc.Hasembedded Then
                        targetpath$ = BasePath$ & doc.universalid & "\"
                        If Dir$ (BasePath$ & doc.universalid, 16) = "" Then MkDir targetpath$
                        '# loop list of fields
                        ForAll f In FieldList
                                 Set rtitem = doc.GetFirstItem(f)
                                 If Not rtitem Is Nothing Then
                                        If (rtitem.Type = RICHTEXT ) Then
                                                '# make sure the field contains some objects and detach
                                                If IsArray(rtitem.embeddedObjects) Then
                                                        ForAll o In rtitem.EmbeddedObjects
                                                                If ( o.Type = EMBED_ATTACHMENT ) Then
                                                                        If FileExists (fname$) Then fname$ = CStr(gCounter&) & Fname$
                                                                        Call o.ExtractFile(targetPath$ & Fname$)
                                                                        gCounter& = gCounter& + 1
                                                                End If
                                                        End ForAll
                                                End If

                                        End If
                                End If
                        End ForAll
                End If
                Set doc = tdoc
        Exit Function
        Print "Error " & Err() & " in line " & Erl() & " - " & Error
        Resume continue
End Function

Profile documents and Author rights in ACL- 30 July 2012 - (0) Comments

Thomas Hampel
 30 July 2012

What if a developer is using user specific profile documents to store some settings in a Domino application.
In this example users have Author access with the ability to create new documents and the ability to write public documents, no roles and no reader or author name fields are used in any document.

Image:Profile documents and Author rights in ACL

I'm wondering why users are not able to modify their own profile document by using the simple formula @Command([EditProfile]; "profile"; @Username)

Of course developers will refer to the Designer Help or
this technote where IBM clearly states:

In order to edit profile documents, including your own profile, using @Command([EditProfile]), you must have at least Editor access or Author access in the ACL plus inclusion in an Author field.

so it sounds like the user name must be listed in an author name field in order to modify an existing userprofile.

Unfortunately in reality it seems to be working slightly different... see this example:

I've created a new form to be used as a profile document, the form contained only a single field

Image:Profile documents and Author rights in ACL
Additionally I've created a small agent with the following code:

Dim s As New NotesSession
Dim doc As NotesDocument
Dim ws As New NotesUIWorkspace
Set doc = s.currentdatabase.Getprofiledocument("profile", s.Effectiveusername)
'# allows to modify the field values in the backend
Call doc.Replaceitemvalue("Test", "test")
Call doc.Save(true, false)
'# allows to modify field values using the frontend
Call ws.Dialogbox("profile", true, true, false, false, false, false, "Test", doc, false, false, false)
Call doc.Save(True, False)
'# does NOT allow to modify the document
Call ws.Editprofile("profile", s.Effectiveusername)

It seems like its possible to modify userprofile documents (which dont have an author name field) even when you dont have author access to the document itself.
To clarify: the application was put on a server and access rights were limited to Author.

Image:Profile documents and Author rights in ACL

I'm wondering if there's any good explanation for this behavior.

Update : The problem has been filed as SPR (Software Problem Report) # RGAU8WZE2X and the Customer Report, APAR # LO71028 was created.

Bug in DominoBlog template- 12 June 2012 - (0) Comments

Thomas Hampel
 12 June 2012

For some reason it wasnt possible to use embedded images within blog postings, looking at the HTML source of the resulting web page showed that some piece of HTML code was inserted when saving the document.
Image:Bug in DominoBlog template
After some debugging, I figured out that it was caused by the scriptlibrary "DXNotesContentProcessing" where the function "autoCreateLinks" is the one to be looked at.

autoCreateLinks(strIn As String) As String
If configdoc.config_createlinks(0)="Create Links" Then
'Search for text and replace with link

Dim view As notesview
Dim docLink As NotesDocument
Set view=db.getview("vLinksDesc")
Set docLink=view.GetFirstDocument
Do Until docLink Is Nothing
If Instr(autoCreateLinks," "+docLink.linktext(0)+" ")>0 Then
" "+docLink.linktext(0)+" ",{ <a href="}{" title="}+docLink.linktext(0)+{">}+docLink.linktext(0)+{</a> })
End If
Set docLink=view.GetNextDocument(docLink)

End If

This function is used to replace a piece of text with the URL configured for it. Its using the links from "Configuration\Links" to search for any entry where the field "Link Text" is matching the HTML string.
Bad luck if one created links like this one, where no link text is specified:

Image:Bug in DominoBlog template

which causes the function above to search for the occurance of 2 spaces "  ", which unfortunately is true for embedded images... actually they are located directly behind the tag.

Image:Bug in DominoBlog template

  • Turn off "Auto Create Links from Link List" located in the configuration document of the blog under "Site Settings\Content Creation"
  • Make sure that all links in "Configuration\Links" are created with a propper link text

What about a permanent fix?

Modify the form "Link" and add an input validation formula to the field "linktext" as shown below.

Image:Bug in DominoBlog template

Creating PDF documents from within Notes/Domino- 3 December 2011 - (0) Comments

Thomas Hampel
 3 December 2011

How can PDF documents be rendered from within a Notes application?
Converting Notes documents into Adobe's PDF format can be a challanging task.
Many different software addon products for Lotus Notes/Domino are being sold to make this happen,
e.g. DominoPDF which is being used by some of my customers - but in fact you dont need anything else than a Java component inside of your application.

Simply by using the iText Library and a small piece of source code, you can add PDF conversion functions to your Domino application. Look at this video to see an example. The solution outlined here makes sense for embedding this functionality inside an application. For single computers instead, its most likely enough to look at FreePDF (english) a freeware PDF converter which installs itself as a printer device.

Delete Workstation ECL- 17 November 2011 - (0) Comments

Thomas Hampel
 17 November 2011

Recently I came across a situation where multiple workstations had a corrupted local ECL. The document itself was corrupted that it was not possible to edit nor refresh it automatically. The only chance was to rebuild the ECL completely by creating a new NAB, which of course is not what users want to do. With some little reverse engineering and the help of some friends, I've figured out how to use an (undocumented) Notes API call to delete the workstation ECL directly.
For those who want to do something similar, here is the sourcecode:


      Agent DeleteECL



ERR_MASK = &H3fff
PKG_MASK = &H3f00

Function NSFDbOpen Lib "nnotes.dll" (ByVal PathName As String, rethDB As Long) As Integer
Function NSFDbClose Lib "nnotes.dll" (ByVal hDB As Long) As Integer
Function NSFDbDeleteECL Lib "nnotes.dll" (ByVal hDB As Long, ByVal UserName As String, ByVal UserNameLen As Integer, ByVal ECLType As Integer) As Integer
Function OSLoadString Lib "nnotes.dll" (ByVal hModule As Long, ByVal stringCode As Integer, _
retBuffer As String, ByVal bufferLength As Integer) As Integer

DeleteECL(Source As Button)
Dim rc%, build&, filename$
Dim hDB&
Dim s As New NotesSession
      build& =  s.NotesBuildVersion        

If build& <= 190 Then filename$ = "desktop5.dsk" Else filename$ = "names.nsf"
Print "Using desktop file : " & filename$
      rc% = NSFDbOpen (filename$, hDB&)

If rc% <> 0 Then
Print "Unable to open " & filename$
End If
      rc% = NSFDbDeleteECL  (hdb&, s.UserName,
Len (s.UserName), 1)
If rc% = 0 Then
Print "Successfully deleted local Workstation-ECL in file " & filename$ & " for user " & s.UserName
Print "Not successful, returncode = " & rc%
Print GetAPIError  (rc%)
End If
      rc% = NSFDbDeleteECL  (hdb&, s.UserName,
Len (s.UserName), 2)
If rc% = 0 Then
Print "Successfully deleted local Applet-ECL in file " & filename$ & " for user " & s.UserName
Print "Not successful, returncode = " & rc%
Print GetAPIError  (rc%)
End If
      rc% = NSFDbDeleteECL  (hdb&, s.UserName,
Len (s.UserName), 3)
If rc% = 0 Then
Print "Successfully deleted local JavaScript-ECL in file " & filename$ & " for user " & s.UserName
Print "Not successful, returncode = " & rc%
Print GetAPIError  (rc%)
End If
      rc% = NSFDbClose (hDB&)


GetAPIError (errorCode As Integer) As String
'** this function translates Notes API error codes into their
'** corresponding error strings
Dim errorString As String*256
Dim returnErrorString As String
Dim resultStringLength As Long
Dim errorCodeTranslated As Integer
'** mask off the top 2 bits of the errorCode that was returned; this is
'** what the ERR macro in the API does
      errorCodeTranslated = (errorCode
'** get the error code translation using the OSLoadString API function
      resultStringLength = OSLoadString(
0, errorCodeTranslated, errorString, Len(errorString) - 1)
'** strip off the null-termination on the string before you return it
If (InStr(errorString, Chr(0)) > 0) Then
              returnErrorString =
Left$(errorString, InStr(errorString, Chr(0)) - 1)
              returnErrorString = errorString

End If
      GetAPIError = returnErrorString



How to enable/disable advanced DB properties such as DAOS- 1 September 2011 - (2) Comments

Thomas Hampel
 1 September 2011

Is it possible to set / remove the DAOS - flag in the advanced DB properties via Script??

Up to now I thought its possible to do it in the same way as for all the other DB flags as shown in this technote.

But it looks like the DAOS flag isnt stored in there....

Well in fact they are stored in there... but they are only exposed with ODS51 and the flag is not written to the $Flags field but written to a $DAOS field.

$DAOS=1 means enabled

$DAOS=0 means disabled

One could set the flag by using the small script supplied in the technote above and referring to the $DAOS field instead, but wait there's a better option:

Just use an (undocumented) LotusScript method "GetOption" and "SetOption" of the NotesDatabase class.

Call NotesDatabase.SetOption(81,true) will enable DAOS


'# Server name in canonical format, use "" for client:
Const Servername$ = ">>>your server name here<<<"
Dim db As NotesDatabase
Dim dbdir As New NotesDbDirectory(servername)
Set db = dbdir.GetFirstDatabase(DATABASE)
While Not db Is Nothing
'# Skip databases which you don't have access to
On Error 4060 GoTo Error4060
Call db.Open(servername, db.FilePath)
Call db.setoption(DBOPT_LZCOMPRESSION, True)
Call db.setoption(81, True)        '# DAOS Enable

Set db = dbdir.GetNextDatabase()
Exit Sub

'# If the code reaches here then the agent does not have access rights to the db.
Print db.FilePath & " incorrect rights to access!"
Resume GetNextDb

View Icons changed between Domino versions- 13 October 2010 - (0) Comments

Thomas Hampel
 13 October 2010

A customer asked me if the icons which are displayed in views have been changed between Domino 7.0 and 8.5.

In fact they did, see the difference yourself - when displaying icons in a view, Domino R6.5 and 7.0 are displaying those icons

Image:View Icons changed between Domino versions

starting with Domino 8.5. the icons have changed - in general they now display less colorful.

Table of column icons

Extract file name and display in a view- 24 September 2010 - (0) Comments

Thomas Hampel
 24 September 2010

If you want to display the file name in a view, but you only have a field containing file and pathname, here is a small formula to get the file name only.

Thomas Hampel, All rights reserved.