BPM move inventory when primary bin is changed

Racking my brain here on this one.

I keep getting this error:
image

All I have in the BPM is an invoke BO to InvTransfer.ChangeFromBin and I’m using dsPartWhseRow.PrimBin for the ipBinNum parameter.

What is triggering the BPM is Part.Update. Doing this at the pre-processing level. The condition is set to when the Primary bin changes from any to another. Tested it with sending an email, which worked.

It’s like it’s not getting the value from dsPartWhseRow.PrimBin value. Yet I can get it when I do a popup window or email.

I know there is other BO methods that need to be called to actually move the inventory, I wanted to do each step to confirm it worked before adding the next step.

my first thought is that hasn’t been updated yet, because it’s a pre-proc BPM.

Changed it to Post and tried a couple different ways but no go.

Looks like the issue all comes down to InvTransfer.ChangeToBin

Getting this error:
image

Not really enough context to help code snippet. It looks like the ChangeToBin method you are calling is not being provided the correct context i.e missing some setup. Trace in Dev Tools the calls that are made by the app to model. It seems a little odd to me that you just want to move the stock without adding a material movement for someone to action it or a label for someone to move it physically though.

1 Like

The problem we’re running into is that the warehouse staff will physically move the inventory, change the primary bin, but not move the inventory in epicor.

Maybe it’s a training thing but they’ve been told to move inventory in epicor probably 10 or more times and still don’t do it. So we’re trying to get ahead of it.

At this point, I think I decided to just pop a warning when the primary bin is changed. I’ve traced and tried everything to get it to work in a BPM but I can’t seem to get it to work.

Hey Alan,

How about reducing the transactions to one? On the Transfer Inventory transaction, add an indicator to change the Primary Bin for that part. The transaction has everything it knows: Part, Warehouse, and to Bin. Just a thought…

Haven’t tried it but I think that this the hang up here.

When I just try to invoke only the changetobin or changefrombin (tried both cause why not), I get the nullreference. Even though that same variable is showing in a popup if I disable the BO method invoke. So it’s not null.

The only variable that changetobin or changefrombin needs is the bin (ipToBinNum.)

Based on what testing I’ve done, that method is the problem, if I could just get that to work, the rest would I imagine.

Did you ever get this figured out?

I did. I don’t know if it’s a perfect solution.

I can pull the BPM and see if it helps you. Is there an issue you’re running into?

Primarily when Im trying to check the Bin a part is in. For some reason it’s throwing a fit about PCID. When I manually transfer a part & quantity into another bin it works fine and doesnt require PCID. I would very much appreciate an BPM or code to help. I just made a post about my issue here: Inventory Transfer UBAQ-Custom Code problem "PCID required"

Sadly I went looking for it and I can’t find it. Wish I could help more. I must’ve deleted it for some reason. I think it wasn’t working right or something.

Build and ship so much stuff these days I forget even working on some of these things or what happened to it. Loads of notes and logs and still can’t cover everything.