General X++ Development

How do I extend a protected method in X++?

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

How do I extend a protected method in X++?

SSunny Vasty75 reputation · answered Aug 13, 2026

Protected methods can be wrapped with Chain of Command when the method is wrappable.

X++
[ExtensionOf(classStr(MyClass))]
final class MyClass_Extension
{
    protected void processInternal()
    {
        next processInternal();

        // Additional logic.
    }
}

Extension classes can also access protected members of the augmented class.

Private members are still private. CoC does not magically make them accessible.