O'Reilly logo

Programming Microsoft® Dynamics™ NAV: Create, modify, and maintain applications in NAV 5.0, the latest version of the ERP application formerly known as Navision by David Studebaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Computation—Validation Utility Functions

C/AL includes a number of utility functions designed to facilitate data computations and validation or initiation of field contents. The following are some of the Validation Utility Functions:

TESTFIELD

The TESTFIELD function is widely used in standard NAV code. With TESTFIELD, you can test a variable value and, if necessary, issue an error message in a single statement. The syntax is as follows:

Record.TESTFIELD (Field, [Value] )

If a Value is specified and the field does not contain that value, an error condition is raised (i.e. the process terminates) and the associated error message is issued. If no Value is specified, the condition evaluated is relative to zero or blank. If no Value is specified and the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required