How does Epicor pick a site's primary warehouse?

When I create a new part, it saves an entry in the site I am currently logged into. While it does that, it also sets the primary warehouse of the part in that site. What logic does Epicor use to pick that warehouse? Why doesn’t it use any logic when you setup subsequent plants for the part to exist in?

In Company Configuration > Modules > All Modules > General, there is a Default Site and a General Warehouse, both of which were set when the program was originally installed (they can be changed). If you are creating a part in the default site, it will copy the General Warehouse value into the Primary Warehouse the part.

There is no equivalent setting for other sites that I’m aware of, but it could be set via BPM on part creation.

2 Likes

Thank you. In Site Configuration, there is a very similar looking form that offers the ability to set the warehouse defaults by site. I would’ve never found this. Thank you!!

@Ernie I’m reaching back out on this topic. I set up a BPM that fires Post Processing on Part.OnChangePlant method. So after a person sets the plant for a new part plant record, it should fire this BPM. And it does. However, inexplicably, sometimes the primary warehouse field fills in on the form and other times it doesn’t. It always seems to save fine… but to the user, it’s not consistent and it’s buggy. Any ideas why this might be? And if there’s anything I can do to “refresh” the UI from the BPM? Do I need to send something back to the form maybe using callContext data and then do some kind of manual refresh on that particular form control? I don’t want to refresh the whole UI because the row isn’t yet saved.

You could most definitely do that, however I would really like to know why it’s inconsistent.

I’m wondering if there is some other field that needs to change to trigger the normal refresh,
or some other BPM that needs to fire before it refreshes.

Intriguing.

Some more tracing might be in order.

I’m not a programmer so I can’t advise you there, but in order to troubleshoot I’d go into a testing environment and manually start adding plants to parts and see if there’s any commonality between the parts (or plants) that fail.

Setting the primary warehouse SHOULD be default functionality…

@Ernie - Thanks! Yeah I started down the path of seeing if there was any consistency. At first, it seemed like it worked the first time I tried to add a site, but not subsequent sites in the same session. But then that wasn’t always the case. Hence why when I initially tested it I thought everything was fine. Then I thought it might be because the warehouse I was trying to set was not accessible from my current site… but I had the same issue even when I was in the same site.

@klincecum - I will take a closer look at the traces for all changed fields. I think you’re right I must be missing something.