General X++ Development
How do I call `next` in a Chain of Command method?
How do I call next in a Chain of Command method?
1 answer
Write an answerCall the same method name with next.
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.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer