I’ve been attempting to set up a BPM on Part.ChangePartTypeCode. The BPM should be simple, since we only manufacture in the US I want to set the PartCOO to United States when a part is changed to PartTypeCode of “M”.
I have tried pretty much everything under the Setters category and none of them seem to be working. I’ve attempted to update the PartCOO.OrigCountry, Part.IsOrigCountryNum, and both at the same time, but nothing happens. Has anyone successfully attempted something similar?
I actually did think of that. I have a test part I’ve added Albania as the COO but still unable to make a change. Good recommendation though, I might try calling the GetNewPartCOO method and see if I can do anything there.
I am wondering though if the fields I mentioned are even the correct fields to be updating.
Edit:
I did attempt to update the table with a query in the GetNewPartCOO method and no luck.
I was going to play around with this… but I can’t even find how to assign a COO to a part. My list is blank. Do I have to turn on LOT Country of Origin in company config? That’s the only reference I can find to COO functionality in the help.
I think the problem is that the dropdown field (Country of Origin) is not pre-populated. When i create a BPM on the post method of ChangePartTypeCode and simply set the ISOriginCountryNum the dropdown field says None Selected. Funny thing is if you create a new item, open en close the dropdown first and then set Manufactured it does automatically set the right country name in the dropdown.
Does it really have to be visible directly after changing the Type or would the Update method be OK as wel? If yes, you can set the right Countrynum in the pre-method of Update. Epicor does a GetByID to your screen afterwards and you will have a country set.
Jordie, that would be fine if it works. I initially started with trying to set this up in the Update, UpdateExt, and MasterUpdate methods and I couldn’t even get a message to fire off after I set the condition of when Part.TypeCode is changed to “M”. It seemed to stop processing there every time.
Sorry I wasn’t more help, haha. I learned a bit while exploring, so, time well spent. I was working on a test BPM when I saw @Jordie chime in with a solution. So, glad you got where you needed to go!