General X++ Development

How do I override `modified()` on a form control using an extension?

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

How do I override modified() on a form control using an extension?

SSunny Vasty75 reputation · answered Aug 13, 2026

Use Chain of Command on the control method when that method is available to wrap.

X++
[ExtensionOf(formControlStr(MyForm, MyControl))]
final class MyForm_MyControl_Extension
{
    public boolean modified()
    {
        boolean ret = next modified();

        // Your logic.

        return ret;
    }
}

Do not copy standard control logic into your extension. Let the standard method run through next and add only what you need.