QUIT, BREAK, EXIT, and SKIP functions
This group of C/AL functions also control process flow. Each acts to interrupt flow in different places and with different results. To get a full appreciation for how these functions are used, we need to review them in the correct place in code in NAV 2015.
QUIT function
The QUIT
function is the ultimate processing interrupt for Report or XMLport objects. When a QUIT
is executed, processing immediately terminates even for the OnPostObject
triggers. No database changes are committed. QUIT
is often used in reports to terminate processing when the report logic determines that no useful output will be generated by further processing.
The syntax of the QUIT
function is as follows:
CurrReport.QUIT; CurrXMLport.QUIT;
BREAK function
The BREAK
function terminates the DataItem in which it occurs. BREAK
can only be used in Data Item triggers in Reports and XMLports. It can be used to terminate the sequence of processing one DataItem segment of a report...