If you need to do this, the best way that I have found is as follows:
IF FORMAT(MyRecordRef) <> '' THEN
BEGIN
...
...
END;
I consider it to be a little dirty, but it's simple and it works.
The problem is, if there is a constant to do the check I don't know what it is, and you cannot create a checking variable and leave it uninitialized to perform the check, Navision will generate an error with the following.
IF NOT MyRecordRef = UnInitializedRecordRef THEN
BEGIN
...
...
END;
The error in English would be "Type conversion is not possible because 1 of the operators contains an invalid type. RecordRef = RecordRef"
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.