General X++ Development
How do I override `modifiedField()` in a table extension?
How do I override modifiedField() in a table extension?
1 answer
Write an answerWrap modifiedField() with Chain of Command.
[ExtensionOf(tableStr(MyTable))]
final class MyTable_Extension
{
public void modifiedField(FieldId _fieldId)
{
next modifiedField(_fieldId);
switch (_fieldId)
{
case fieldNum(MyTable, MyField):
// Your logic.
break;
}
}
}If the logic is really business logic, table-level modifiedField() is usually better than tying it to one form control because it also works when the record is edited from somewhere else.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer