1. Add new enumeration value to \Data Dictionary\Base Enums\MCROrderEventType
Do not forget to leave a gap
2. Add new field to \Data Dictionary\Tables\MCROrderEventSetup of type Enum - NoYes
In similar way as majority of fields in this table
3. Add newly created field to SalesTableGroup field: \Data Dictionary\Tables\MCROrderEventSetup\Field Groups\SalesTableGroup.
Or to other one if you have other type of event.
4. Open Sales and Marketing -> Setup -> Events -> Order events form and check that created by you field is on the form and correctly working with Select all and Clear all buttons
5. Add to \Data Dictionary\Tables\MCROrderEventTable\Methods\insert additional case in similar way as many existing to handle your type of event.
6. Add new method to \Data Dictionary\Tables\MCROrderEventTable like:
public void insertRefundCharges(SalesTable _salesTable, MCROrderEventType _mcrOrderEventType = MCROrderEventType::RefundCharges)
{
this.SalesId = _salesTable.SalesId;
this.MCROrderEventType = _mcrOrderEventType;
this.setTableAndRecId(tableNum(SalesTable), _salesTable.RecId);
if (this.validateWrite())
{
this.insert();
}
}
Use it to insert new event records