I want to override the default ShipVIACode for all OrderHed/OrderRel lines created when EDI orders are imported. I want to instead set it to the ShipVIACode found in the ShipTo table for the specific customer/ship to the order is for.
I am having a very difficult time finding the correct method (literally and figuratively). The orderes created on EDI import do not use the same BOs that a manually created order uses and tracing is proving difficult.
I would prefer to do this widgets and not custom code but whatever.
You could probably use a Data Directive on something like that. If you can get a criteria to isolate those orders (maybe EntryPerson?), you could add a data tag on an In-Tran Data Directive, then use a standard Data Directive on OrderHed along the lines of these widgets:
On OrderHed, if the record has the data tag
Call the SalesOrderSvc BO to change the ShipVia
Remove the Data Tag
If you’re on a version with Epicor Functions, I’d probably move that second stage to a function, and invoke the function from the BPM.
If you look at the chart there you can fix the shipvia before it gets to demand entry with a base directive on ImportEDIb4Val. I made one in widgets for this. Two variables, CustNum and ShipTo