[TABLE]
Error trapping tests a particular condition when running a program. If the program runs into an error, it will then execute a corresponding routine to fix the error. This should always be done. Error handling is not a joke -- it should always be handled in a serious manner and should always be mandatory.
There are two ways to go about this:
[TABLE]
While it may seem a bit paranoid, you should practice using defensive LotusScript coding -- it will save you time in the long run. Always assume the worst and check all inputs on every function. It doesn't usually affect performance, but it is a good failsafe.
Here is a good example of defensive LotusScript coding in a typical function.
[TABLE]
When creating commercial applications, it's a very good idea to hide your code. But, you may be asking how. There are actually two ways you can go about it:
[TABLE]
You should never store date/time values as strings. It is always good practice to use NotesDateTime structures instead and save them.
You might say, sure, but why? Well, you never know how the client will interpret dates. Is it dd/mm/yyyy or mm/dd/yyyy? It also means that views will be able to sort on dates.
Trust me, this is a good tip to practice. This issue comes up more often than you might think.
[TABLE]
A good reason to consider using DXL as Transport stems from a situation where a customer wants to easily send back "log" documents. When this happens, you can use a LotusScript agent to:
At the receiving end, this will:
This way, you are transferring data without replication. Below is a sample code of this being implemented.
[TABLE]
When using a wizard interface with your Lotus Notes client, there are a few steps you should follow:
[TABLE]
There are two different way
To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

s you can go about consuming Web services. The first is quick and to accomplish it, you should follow these steps:
Below is some code that illustrates how to create the Microsoft SOAP object.
The other approach is a little different. It's big and robust and uses Stubby. Just point it at a Web service and it produces the code for you.
Some good points about it are that it is multi-platform, scalable and there are no dynamic link libraries. However, it does require you to use more than four lines of code.
[TABLE]
When developing with LotusScript, it is always a good idea to use classes. Here are some reasons why:
Classes have a good design methodology, which leads to Java. But everyone is not used to them and it may take time to sink in. Below you will see some code that implements classes.
[TABLE]
The Evaluate command allows you to run @Functions within LotusScript. It is sometimes quicker and easier, as it allows you to use your favorite function in certain situations.
An example of it might be:
Don't overuse it though. Loads of LotusScript functions mimic @functions.
[TABLE]
It is good practice to use trusted servers because scheduled agents cannot normally open databases on other servers.
The "trusted servers" field in a Lotus Domino R6 server document's security section allows servers to trust other servers. By doing this, it allows you to centralize "collection" agents. You also simplify your architecture and limit the number of agents you use. However, it does rely on a fast, reliable network infrastructure.
As a final note, make sure to never trust servers in another domain.
[IMAGE]
[IMAGE]TUTORIAL: 30 LOTUSSCRIPT TIPS
[IMAGE]
[IMAGE] Home: Introduction
[IMAGE] Part 1: 10 fundamental LotusScript tips
[IMAGE] Part 2: 10 everyday LotusScript tips
[IMAGE] Part 3: 10 advanced LotusScript tips
[IMAGE] Part 4: More LotusScript learning resources