What it means
LotusScript used a Variant as if it held an object (calling a method or property on it), but it actually holds something else, such as text, a number or Empty.
Common causes
- A Variant was assigned with
= instead of Set, so it holds a value not an object
- A function returned an empty Variant instead of an object
- Using a Variant from
GetItemValue or an array as if it were a NotesDocument or similar
Quick fixes
- Use
Set when assigning objects, and declare variables with their real class where possible
- Test with
IsObject(var) before calling methods on a Variant
- Check what the function actually returns with the debugger or
TypeName(var)
Disclaimer
The errors, causes and fixes on this site are carefully researched, drawing on HCL documentation and 28 years of hands-on Domino and Notes experience. Every environment is different, though, and a solution that works in one may not be right for yours. Exact wording can also vary between Domino and Notes versions.
This information is general guidance only and is provided without warranty of any kind. Always back up your data and test changes on a non-production system first. To the extent permitted by law, Bruinsma Services Pty Ltd accepts no responsibility or liability for any loss, damage, downtime or other consequence arising from use of this information. For advice specific to your environment, please contact me.