Set primary bin from BPM?

Any one know how to set the primary bin from a BPM?

I cannot seem to get it to work.

1 Like

It’s possible. What method are you trying to use?

The Primary Bin is in the PlantWhse table: PlantWhs.PrimBin not the PartWhse

Thank you for this. Should I be using the “Set Field” object or is there a better way? I cannot seem to get it to work even with the proper bin location.

I figured out set field won’t work but what I setup now doesn’t seem to work either.

I pull down the PlantWhse data with a BO. Set the dataset.
Then set the variables for the things I want to change
Update the table using the variables
Then I attempt to run the BO method for PlantWhse update and I get a Null Exception error.

Unsure it matters but PlantWhse only comes up as PlantWhseSearch.

I disconnected the final BO because it will error out with the Null Exception if I don’t.




I’ve never done this in a BPM, but I did make a uBAQ for primary bins.

So,

  • The table is PlantWhse
  • I think the business object for modifying it is called PartWhse (not PlantWhse - there is no such BO)
  • …or maybe just Part. Read on:

Tried both PlantWhse and PartWhse. No go.

Haven’t tried just part though. Seems like no matter how I set it up, it doesn’t update the bin. I can update everything else it seems.

Brain is kinda wrecked on this one.

did you try simply creating a DATA BPM on the PlantWhse table to see if you can get it to set automatically there?
One challenge is that if you try to trigger it from Part.Update, the PlantWhse record may not be created yet, so you cannot update it. but if you do it based on the Data in PlantWhse being created, then it would/could work

I haven’t yet. But I think that is my next step. I was thinking the same thing with it not existing or not.

I did try to change the bin when it is set based on Part.Update. Still didn’t work. Granted I used the Set field widget/object. I tried both PartWhse and PlantWhse. Neither worked.

After enough fiddling and not getting anywhere I wanted to try something different.

I went over to the REST API portal and tested some of the different endpoints out.

What I found is PartWhses was the one that actually updated the bin. Not PlantWhse or anything else. I should note that, using PlantWhse and others I tried, kept coming up with a error 400.

This is the JSON I sent in:

{
“Company”: “111111”,
“PartNum”: “PAR.1000”,
“WarehouseCode”: “mfg”,
“Plant”: “MfgSys”,
“PrimBinNum”: “WC”
}

Now, I’ll see if I can modify the BPM to update via PartWhses and see if I can get it to work there some how. I know I tried already in the BPM but if it works via REST, then why shouldn’t it work in the BPM?

1 Like

I poked around a BPM (method directive) but I could not get it to work.

I am not at all saying it is hopeless; I’m just saying I feel your pain.

So, one thought, if it helps. The way you change this in the DMT is called “Part Warehouse.”

It is possible to do a trace on DMT. Maybe the trace there could fill in the missing dino DNA?

1 Like

Honestly the way I’m thinking of giving up on the BPM method on this.

I have another script that pulls in the latest jobs to then update other applications.

So same theory here. Pull in the parts with the ones last updated via REST. Store said data in an external database. Then write my script to send a call via REST to update the bin.

Maybe not the proper or elegant solution but I know it will work. Unless someone can show me how to make it work in a BPM, I’m pretty sure this is the route I’m going. Plus side is I can use this data in other ways.

Call PartSvc.UpdateExt with that same data and see what happens.

I believe I tried that previously with no success. Don’t have it setup to that right now though.

I know this is an old thread…but did anyone ever get this to work with BPM?