+

Search Tips   |   Advanced Search

Exiting a Branch (or Loop or the AL Flow)

If you want to exit a Branch, Loop, or Switch, or even built-in Branches like the AL Flow section, you use the system.exitBranch() method from a place where we can script, for example, a Hook, or even a Script Component. Calling system.exitBranch() with no parameters (or with an empty string) will cause the containing Branch to exit, and flow continues with the first component after the Branch. We can also provide the method with a string parameter containing either:

There is also a continue functionality in Loop Components. The following methods are available in the system object:
system.continueLoop();
system.continueLoop(name);
where name is a case-sensitive string, indicating a Loop name. In the case where a Loop name is provided, the program flow is transferred to the Loop Component with that name.


Parent topic:

Branch Components