Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

alt

Daniel Nashed

Check the minimum client version for your Notes application

Daniel Nashed – 24 October 2024 17:55:14

Notes provides new functionality in Lotus Script and there also Java classes added to the client.
Lotus Script Named documents have been introduced in Notes/Domino 12.0.1.
I have just written an application which needs a Java class which is introduced in Notes 12.0.2 as it turned out.

So I came up with a simple check I am going to add to all my applications which use more current functionality.

You can drop this code into the PostOpen script of any database and switch to the right constant


Image:Check the minimum client version for your Notes application


Function CheckRequiredVersion As Boolean
       
        Const  BuildVersion1201 = "12.0.1|470"
        Const  BuildVersion1202 = "12.0.2|475"
        Const  BuildVersion1400 = "14.0|485"
        Const  BuildVersion1450 = "14.5|495"
       
        Const RequiredVersion = BuildVersion1202
       
        Const TXT_TITLE = "Please upgrade your Notes Client"
       
        Dim  CR  As String
        CR = Chr(10)
       
        Dim session As New NotesSession
        Dim CurrentBuildVersion As Long
        Dim CurrentNotesReleaseStr As String
        Dim CurrentNotesBuildDateStr As String
       
        Dim RequiredBuildVersion As Long
        Dim RequiredNotesReleaseStr As String
       
        CheckRequiredVersion = False
       
        RequiredNotesReleaseStr = Strtoken (RequiredVersion, "|",1)
        RequiredBuildVersion = Clng(Strtoken (RequiredVersion, "|",2))
       
        CurrentBuildVersion = session.NotesBuildVersion
        CurrentNotesReleaseStr = Strtoken (session.NotesVersion, "|",1)
        CurrentNotesBuildDateStr = Strtoken (session.NotesVersion, "|",2)
       
        If (CurrentBuildVersion >= RequiredBuildVersion) Then
                CheckRequiredVersion = True
                Exit Function
        End If
       
        Messagebox " You are running:  " +  CurrentNotesReleaseStr  + CR + CR + " This application requires:  " +  "Release " + RequiredNotesReleaseStr, 48, TXT_TITLE
       
End Function




Comments

1Peter Pandora  25.10.2024 6:43:09  Check the minimum client version for your Notes application

I am curious how this will automatically calculate the required version? Isn't that a constant value in your code?

2Daniel Nashed  25.10.2024 8:38:11  Check the minimum client version for your Notes application

@Peter the constant value is the minimum version you have to set for your application.

This value is compared to the actual build number.

That's why the parameter is named RequiredVersion. you set it to the value your application needs as a minimum.

The constants above are just to give you the right values you can pick from.

This script is a sample that needs to be adopted to your minimum requirements.

-- Daniel

Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]