General X++ Development

How do I call `next` in a Chain of Command method?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

How do I call next in a Chain of Command method?

SSunny Vasty75 reputation · answered Aug 13, 2026

Call the same method name with next.

X++
public boolean validate()
{
    boolean ret = next validate();

    // Additional validation.

    return ret;
}

next continues the Chain of Command and eventually reaches the base implementation.

Where you place your custom logic determines whether it runs before or after the next implementation in the chain.