I need to customize the Order Entry screen to allow a mass update of the OrderRel fields Plant and Warehousecode Effectively changing the plant the order will be fulfilled from.
A previous post suggested doing this by walking through the epidataviews of the current order, and making the update there. Then upon saving the order the DB would be updated.
This would be my first time using dataviews, and I’m not sure about all the “houskeeping” that is required to use them properly. So here’s some basic noob questions:
Does the UI always reflect the values in the dataview?
I.E. If I change a dataview for OrderHed.ShipToNum to a valid value, would the ShipToNum UI control automatically update, or is a call required to refresh the UI?
And what about fields driven from that control? Would the address control be automatically updated to the value related to the new ShipToNum? (like it does when you manually update the ShipToNum field and hit tab)
While experimenting, it looks like the dataviews are “filtered” to the current context. For example, the dataview for the OrderRel only contains the release for the currently selected order line.
If so, it looks like I’d have to cycle through a dataview for OrderLine, selecting each line, and then cyling through a dataview for OrderRel, for each release of each line.
So what would be the code to:
Cycle through each release, of each line, of the current order, displaying a messageBox with OrderRel.Plant ?
Cycle through each release, of each line, of the current order, changing OrderRel.Plant to ‘MfgSys’? (later I’ll add checks for things like a valid partplant record, and what not)