SEARCH:
Previous: History Tables Next: Basic Security

Constraints

There are two basic kinds of constraints. They are thoroughly explained in the reference section and will not be discussed in great detail here, except as an introduction.

Column Values

A constraint can be placed on any column. In terms of syntax it looks exactly like a calculated value (like extended price in a previous section). The big difference is the return value. If a constraint returns an empty string, the constraint is considered to have not fired, and the transaction is allowed to continue. If the constraint returns a string, the constraint is considered to have failed, and the string is expected to be an error message.

Preventing Changing Rows

It is possible to put constraints onto tables that will prevent rows from being changed, such as after a closed has been set. These are useful if you want to prevent changes to a GL batch after it has been balanced and posted.

Previous: History Tables Next: Basic Security