I would like to add a field to InventJournalTable that will be copied into an identically named field in InventTrans after posting. The fields are added, and the Journal currently contains the correct value, but after posting, the InventTrans table only c
You should create a new InventMovement method like this:
Then modify \Classes\InventMovement\initInventTransFromBuffer
And finally overload the new method in the InventMov_Journal class:
public MyNewFieldType myNewField()
{
return MyNewFieldType::DefaultValue; // suppose your new field is an enum
}
Then modify \Classes\InventMovement\initInventTransFromBuffer
void initInventTransFromBuffer(InventTrans _inventTrans, InventMovement _movement_orig)
{
// ...
_inventTrans.MyNewField = this.myNewField();
}
And finally overload the new method in the InventMov_Journal class:
public MyNewFieldType myNewField()
{
return inventJournalTrans.MyNewField;
}