Today I found a strange sideeffect in LotusScript. After calling the method
NotesDocument.convertToMIME()
I used the @Function
@ClientType
some times later in my IBM Notes Standard Client. The result from this @Formula was "Web" <- which is obviously not true ;)
Only after restarting the Notes Client @ClientType seems to be 'resetted'. I tested this behaviour on Notes 8.5.3 FP6 and Notes 9.0.1 with the same effect. I realized times ago that @ClientType does not work correctly, but I didn´t see a pattern. Now I could explain why sometimes the formula results the wrong value.
I just opened a PMR at IBM, perhaps there is someone who could tell me in the meantime if there is a possibility to 'reset' the @ClientType to normal after using NotesDocument.convertToMIME() ;) (notes.ini, other script function or so)
Many thanks!
Carl
Here is a little code for testing. Just paste it in a view action or button:
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim vRes As Variant
vRes = Evaluate({@ClientType})
Print "Client Type before: " & Cstr(vRes(0))
Set db = session.CurrentDatabase
Set doc = db.CreateDocument
Call doc.ConvertToMIME()
vRes = Evaluate({@ClientType})
Print "Client Type after: " & Cstr(vRes(0))