Skip to content

LotusScript

LotusScript is the programming language in HCL Notes and Domino. It resembles Visual Basic and is used for agents, buttons and logic in Notes applications.

LotusScript is the programming language in HCL Notes and Domino. It resembles Visual Basic and is used for agents, buttons and business logic in Notes applications. Almost every Notes application with any complexity contains LotusScript.

What is LotusScript used for?

  • Agents that run at a set time or when something happens, for example when a document is saved or a mail arrives.
  • Buttons and events in forms, such as validation, calculations and approval workflows.
  • Integration with other systems through ODBC, LS:DO, COM, web services and HTTP calls. That is also how you integrate ChatGPT into a Notes application.
  • Administration, such as scripts that create users, clean up databases or move documents.

What LotusScript looks like

The language is object oriented, with classes for session, database, view and document. A document is read with doc.GetItemValue("Field") and written with Call doc.ReplaceItemValue("Field", value). The latter is the safe way to write fields, because it always replaces the value regardless of field type.

LotusScript and the formula language

Notes has two languages. The formula language with @functions such as @If and @DbLookup is used for fields, views and simple calculations. LotusScript is used when the logic grows. Most applications use both. In addition, Java and JavaScript can be used in XPages.

Is LotusScript obsolete?

The language dates from 1995 and gets few new features. But it works, it is stable, and HCL has added support for HTTP, JSON and 64 bit. The problem is rarely the language, but that few developers know it. That is where an experienced Notes consultant makes the difference.

Common questions about LotusScript

Can LotusScript be converted to C# or Java?

Not automatically. The logic must be rewritten. Before a migration we first map which agents are still used, so you do not rewrite dead code.

Does LotusScript work in HCL Nomad?

Most of it. Calls to Windows DLLs and OLE do not work on mobile and web.

Can AI write LotusScript?

Yes, modern language models know LotusScript fairly well. But the code must be reviewed by someone who knows Notes before it goes into production.

Help with LotusScript

We have written LotusScript for three decades and maintain old agents as gladly as we build new integrations. Read about Notes development.

All terms in the glossary