Erdmann, Ingo; GCC K-Nuggets: Using the template version information feature of Notes/Domino 6.01, GCC, Paderborn 2003.

THEMES: Erdmann, Ingo\K-Nuggets | GCC K-Nuggets\Software Devel...
YEAR: 2003
Login Login
User: Anonymous


LABEL: Lotus Notes/Domino Designer
THINGS: Build | Development | Template | Version
 
The template version information feature of Notes/Domino 6.01 can be used by any developer. It's not elegant and not officially supported, but not a problem to do either. The information is stored in a shared field.
The field has to be named "$TemplateBuild". The items that contains the version information have to be named "$TemplateBuild", "$TemplateBuildDate" and "$TemplateBuildName". Creating a shared field from scratch does not work. I did not do any further analysis about necessary field flags, but you can copy and paste the shared field from any Lotus Template and modify the fields using the following sample agent code:

Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim designDoc As NotesDocument
Dim releaseDate As NotesDateTime

Set db = s.CurrentDatabase
Set designDoc = db.GetDocumentByID("PutInNoteIDofSharedFieldNoteHere")

Call designDoc.ReplaceItemValue("$TemplateBuild", "PutInVersionNumberHere")
Call designDoc.ReplaceItemValue("$TemplateBuildName", "TemplateBuildName")
Set releaseDate = New NotesDateTime("PutInReleaseDateHere")
Call designDoc.ReplaceItemValue("$TemplateBuildDate", releaseDate)
Call designDoc.Save(True,True)
End Sub

Voila, there goes your version number and build information.