Mass change "From Site & Warehouse" on Order Entry

We have 4 sites, and sales often needs to change the “From Site” on sales orders. Normally the site you launch Order Entry from is the default site for “Form” on Order Releases. If you want it to ship from another site, then you have to manually change the Site and warehouse.

image

This requires selecting each release of each line, and manually changing it. Some orders can have 200+ lines.

I tried un-hiding the “WarehouseCode” field on the grid in the Lines-> List sheet. But that doesn’t seem to link to anything. I can search for a warehouse code and select it. But as soon as I leave that row, it reverts back to blank.

I’m thinking about making an update-able Dashboard, but I’m not sure if changing the Site and Warehouse on an Order release, doesn’t automatically change other things (like price).

Is there an easy (preferably “built-in”) way to move an order from one site to another?

And changing the Order number is a no-go, So we cant just copy the order from the desired site.

I have seen this done multiple ways, but most always done with a BPM.
One option is to include a UD FIeld in the Order Header that holds the “default Shipping Site” for the order. When someone changes this, a BPM fires to update all the releases to that site (if the site is valid for the part).

1 Like

What happens if the P/N is not valid for the site?

Because we only manufacture at Site A, so its common to have MTO lines that will ship right from WIP, with no P/N in the system. Sometimes these MTO parts are made in site A, but need to ship from site B. So for those we create a P/N in sites A and B, so we can do a transfer order.

My fear is that the order was originally entered, with the expectation it would ship from A. So not Part entries created. Later we find that it needs to ship from B - and sometimes this is after the jobs have started in site A.

FWIW we use product group Sales Plant setting to get the correct plant … much of the time. We have order entry going on in 3 plants and all parts setup for all 3 plants.

I have done occasional audit to see where users were changing the plant from the defaulted, to get a hold on where we were not getting efficient assignment of plant. Sometimes we’ve changed product group on a part, realizing it was actually primarily getting sold for another product group.

I do like Tim’s idea for the BPM though as it seems more likely to handle all of the scenarios.

Nancy

1 Like

I did this via a c# UI customization. I added a button called “Change All Releases”

On click of the btn, I loop through all of the releases in the release Epidata view table and set the value to whatever the combo boxes are set at on the release the user clicked the button on.

I then prompt the user to save the record.

More logic could be added to check the partwhse record before changing the release. I also only change releases that do not match the one the user is trying to change to and only look at open releases.

1 Like

I dont think things behave well if the part does not have a valid PartPlant record, so this should be the validation. It should also probably update the warehouse to the default warehouse for the partplant.

We use the configurator for most Make to Order parts, and the configurator’s base part has PartPlant entries in all plants.

One thing that could cause issues is that we use BTO a lot. I’ll have to think about the impact of changing a BTO lines release, AFTER a linked PO is created.

My rule: if you can’t change the site naturally with the Sales order Entry on the Release tab, then you shouldn’t do it programatically with a BPM.

1 Like

Care to share the code for this? I’ve not done much with code using Epi data views.

I just need the way to reference the epiview, and loop through it. I think I can figure out the rest.

Here you go! Sorry for the delayed response!

EpiDataView orderRel = (EpiDataView)(oTrans.EpiDataViews["OrderRel"]); // We will need the order release view
string currSite = orderRel.CurrentDataRow["Plant"].ToString();
string currWhse = orderRel.CurrentDataRow["WarehouseCode"].ToString();
        
        foreach (DataRow relLine in orderRel.dataView.Table.Rows)
        {
            if ((bool)relLine["OpenRelease"] == true && (string)relLine["Plant"] != currSite && (string)relLine["WarehouseCode"] != currWhse)
            {
                relLine.BeginEdit();
                relLine["Plant"] = currSite;
                relLine["WarehouseCode"] = currWhse;
                relLine.EndEdit();               
            }
        }
		oTrans.NotifyAll();  
1 Like

can you show an example how you did this solution?