Hello,
We have created an ER which generated excel file.
I have created a menu item on the Transfer order form, which directly executes and downloads the file.
For that we have to enable File in destination settings.
Now we want to have same file generated and sent to predefined e-mail address during the Transfer order ship process.
My question is how to differentiate in code in what destination file should go?
My current code which is executed by actiion menu item looks like below.
So is there a possibility to manage / modify the destination settings through code?
ERIFormatMappingRun formatMappingRun = ERObjectsFactory::createFormatMappingRunByFormatMappingId(_contract.parmERFormatMappingId())
.withParameter(new ERModelDefinitionDatabaseContext()
.addValue(tableNum(InventTransferJour), fieldNum(InventTransferJour, TransferId), _contract.parmTransferId())
.addValue(tableNum(InventTransferJourLine), fieldNum(InventTransferJourLine, TransferId), _contract.parmTransferId())
.addValue(tableNum(InventTransferJourLine), fieldNum(InventTransferJourLine, VoucherId), _contract.parmVoucherId()))
.withFileDestination(_contract.getFileDestination());
formatMappingRun.parmShowPromptDialog(false);
formatMappingRun.run();