f: Record(2000000022) f.SETRANGE(Path,'C:\Temp'); MESSAGE('%1',f.ISEMPTY);This works if the folder C:\Temp exists. But if you try the same code with a folder that doesn't exist, you'll get an error (even though the code shouldn't be able to do this), but even weirder is the fact that if you run the same code again, you don't get an error. Try changing the path name to another non-existing path and you'll get the same error again - but only once.
IF NOT EXISTS('C:\Temp\nul') THEN MESSAGE('Yes') ELSE BEGIN f.SETRANGE(Path,'C:\Temp'); MESSAGE('%1',f.ISEMPTY); END;
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Senior NAV Developer
Elbek & Vejrup
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!