Archive

Archive for the ‘LotusScript’ Category

Lotus Notes Tutorial Custom OK Cancel Buttons and Validation

I discovered something interesting that I thought I would share with everyone. It’s only applicable if you’re using your own OK/Cancel buttons in a dialog box (as opposed to the buttons that Notes generates). For those of you that don’t know, you can specify your own OK and Cancel buttons in a dialog box. All you have to do is add a hotspot button to your dialog box form/subform and choose “OK” or “Cancel” (there’s also one for “Help”) under the “Type” of button.

Read more…

Viewed 6032 times by 2128 viewers

Check Lotus Notes Domino status by IsServerUp Function

Basically, the code connects to the remote server and checks to see if the template log.ntf can be found and it has a valid replica ID. If the template can be found and has a valid replica ID, then the server is up. Otherwise, assume the server is down. Our testing of this function amounted to running it as a scheduled agent with the remote server up and after we shut the remote server down.

Read more…

Viewed 8636 times by 2589 viewers

Lotus Notes Decode Web URL

Although we have heard of an @-function that will decode a URL, but it is undocumentend at this time. In the mean time, here is a generic LotusScript function that will decode any URL.

Update: We have been made aware that the older version of this function did not handle Unicode characters. They are encoded with a “%u” prefix and include 4 hex characters after the “%u”. The version below supports Unicode characters.
Read more…

Viewed 7729 times by 1921 viewers

How to Show Notes API Error

When you do as much work with the Notes API as we do, you’ll end up running into errors at one point or another. When writing programs in C or C++, you can translate the error number to a string pretty easily. But we’re doing more and more with the API in LotusScriptand have many more examples). In this situation, we needed to be able to translate an error number into a text error message.

Read more…

Viewed 4325 times by 1117 viewers

Refresh Lotus Notes Parent document When Closing Child document

During development of a new application, we ran across a situation that I’m sure some of you have seen. We have a parent document and children documents. The children are only displayed in an embedded view in the parent document. So, when you open up the parent, you see an embedded view with “show single category” enabled that shows all the children of that parent. Those children don’t show up in any other view, so you must open up the parent to see them. There’s buttons in the parent to create a child, edit a child, delete a child, etc.
Read more…

Viewed 7237 times by 2157 viewers

Check an RTF Lotus Notes Field is empty

This interesting workaround comes It does cause a little bit of UI flicker, but works on the front-end and back-end:
Function IsRTFNull(rtfield As String) As Integer

‘This function tests a Rich Text field to see whether or not it is null. It returns TRUE if the field is null, and
‘returns FALSE if the field is not null. It works even if the rich text field contains a file attachment,
‘doclink, or OLE object but does not contain any text.
Read more…

Viewed 6548 times by 2021 viewers

Lotus Notes Richtext field checking Attachmentment or Size Without Saving document

Several threads cover the topic of preventing the attachment of overly large files to a Notes document, and one major hurdle seems to be how to do so without first saving the document, let alone without first attaching the file. Without covering all the reasons why this is a challenge, I thought it might be helpful for me to detail the solution that I came up with after reading several posts in this forum and piecing everything together.
Read more…

Viewed 7827 times by 2651 viewers

Change Twisty On Lotus Notes Outline

The outline Notes design element is pretty handy to build navigation for your Notes client, but we found one drawback. If you have collapsable entries, then you’re limited to the standard twisty images (the dark blue ones). This color may or may not go with your application’s color scheme.
Read more…

Viewed 5912 times by 1984 viewers

Change Lotus Notes Replica ID

In a recent project, we were copying databases from one server to another. There were many databases to do, so we decided to write an agent to do the copy. But we wanted copies, not replicas. We found out that the NotesDatabase.CreateCopy method does not copy documents (it only copies the design). We could have used that method, then got a handle to all the documents in the source database and copied them over to the destination database. But instead we used another approach.

Read more…

Viewed 8282 times by 2942 viewers

Lotus Notes Client Background Agents

Notes 6 agents introduced the ability to run a client agent in a background thread. This is a very powerful feature, but you have to know how to properly use it. First off, you cannot perform any UI tasks. However, this is not a drawback. Print statements do work – the results go to the status bar just like any other agent running on the client. The MessageBox LotusScript statement also works. A message will be popped up for the user, and you can proceed in your agent based on the answer (your agent waits until the box is clicked).
Read more…

Viewed 7595 times by 2589 viewers