March 2020
Intermediate to advanced
534 pages
14h 15m
English
Adding fields as an extension is relatively straightforward, but we also need to handle events such as modifiedField and validateField. This is done in the same way, by right-clicking on the Event and choosing the Copy event handler method option.
The problem is that we don't know the field being handled. The DataEventArgs object that is passed in to the method is a based class that can be cast to the correct type within the method; for example, you would write the following code in a ValidateField handler:
[DataEventHandler(tableStr(InventTable), DataEventType::ValidatedField)]public static void InventTable_onValidatedField(Common sender, DataEventArgs e){ ValidateFieldEventArgs fieldArgs = e;
We can then use the fieldArgs.parmFieldId() ...
Read now
Unlock full access