Hi,
ERROR function not can be uses on NAS (for example with scheduled codeunit); MESSAGE function yes.
TESTFIELD("Field, Value") C/AL Command --> returns "by design" an output ERROR Messaget instead of MESSAGE output ...
look at these links:
Progress Windows, MESSAGE, ERROR, and CONFIRM Functions
msdn.microsoft.com/.../dd355271(v=nav.70).aspx
Error Function
msdn.microsoft.com/.../dd355305(v=nav.70).aspx
Message Function
msdn.microsoft.com/.../dd355325(v=nav.70).aspx
Error Handling