LotusScript UndeleteExpireTime Property Returns a Negative Value
LotusScript code that uses an Integer variable to return the UndeleteExpireTime property (of the NotesDatabase class) returns a unexpected negative value. If the property itself is used directly, the expected value is observed.
Further study indicates that this only occurs in cases where the Soft deletion expire time is set to a value greater than 32767.
Steps to Reproduce:
1. Open the Database Properties Advanced tab (beanie tab) for a mail database and set the "Soft delete expire time in hours" to the value 32768.
2. Make sure the "Allow soft deletions" property is also checked.
3. Running the below agent will return 32768 for the property and -32768 for the variable.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim expireTime As Integer
expireTime = db.UndeleteExpireTime
Messagebox "UndeleteExpireTime property " & db.UndeleteExpireTime
Messagebox "Integer variable " & expireTime
The UndeleteExpireTime property is defined with an Integer data type, but the internal Soft deletion expire time is actually a Long value (a Long value has a maximum value of 2147483647). When the value stored in the internal Soft deletion expire time is greater than the maximum value an Integer can store, the issue results.
This issue has been reported to Lotus Software Quality Engineering.
Either work with the property directly or define variables used with the property as the Type Long.
Note: The maximum Soft deletion expire time value should be limited to values no greater than 65535. For more information on a related subject see the following document 1166325: "Opening the Preferences of a Notes Mail Database Results in Error."
Opening the Preferences of a Notes Mail Database Results in Error
Document # 1166325
Translate this page: