EXIT is used to end the processing within a C/AL trigger. EXIT works the same, whether it is executed within a loop or not. It can be used to end the processing of the trigger or to pass a return value from a local function. A return value cannot be used for system-defined triggers or local functions that don't have a return value defined. If EXIT is used without a return value, a default return value of zero is returned. The syntax for EXIT follows:
EXIT([<ReturnValue>])