Duplicated Part Number BPM to set certain fields not working

Hi

I am trying to write (what I think should be a simple) Prost Processing BPM that sets certain fields such as,

  • PartPlant.MinOrderQty
  • PartPlant.LeadTime
  • PartPlant.VendorNumVendorID

But nothing seems to happen. My BPM screenshot is below.

Example: Set the result.PartPlant.MinOrderQty field of the added row to the 0 expression

I guess I am missing something really obvious or it is not as simple as I think.

Any help would be great.

Kind Regards

Jonathan

  1. Is your BPM enabled?
  2. Are you sure that the BO method returns an added row?
  1. Yes my BPM is enabled.
  2. Not sure.

I just traced it. The method does not return an added row. Remove that condition from your action

1 Like

BTW Your changes would only get returned to the client - requiring them to save it. If you want to make sure it is saved, set the row state to updated then call the Part.Update method

OK. But whatever I change it to, updated, changed, etc, nothing seems to happen.

Use “all rows” or “all unchanged rows”

Based on your screenshot, it looks like you’re trying to set fields in a Post-Processing directive. While it can vary, as a general rule, field updates need to happen in a Pre-Processing directive.

Post-Processing directives generally take place after method changes have been made to the database, so it is usually “too late” to use a set field in a post-processing and have it just work out of the box.

If there is a specific reason that you need the update to happen in the post-processing side, you’ll likely need to call some additional BO methods to commit the save to the DB. If there isn’t a specific reason that you’re using post-processing, you might try to move your logic to the pre-processing directive and see if it works.

No particular reason. I am still in the very early days of working with Epicor Kinetic.

I have tried running this as a pre-processing directive but it still not working.

I have tried @mbayley suggestion of using “all rows” and “all unchanged rows”.

Did you also do a Part.Update after marking the row as updated? A Pre-Processing Method Directive as @jepp suggested isn’t possible for DupicatePart because the new part hasn’t been created yet.
You need your BPM to modify fields then Update to save your changes while in Post-Processing

I haven’t as I am not too sure how.

You want to do something like this
image

image

image

image

If you did these actions manually and traced it, you would see these changes in the DataSet and the Update method invoked.

2 Likes

Thanks for the help, but I can’t seem to get this to work. I have tried setting the RowMod field in both a pre & post-processing workflow and I cannot see this in the trace (I am using Developer Tools in Chrome to trace).

try this




Something else to try as a troubleshooting step… throw in a Show 0Message box, and in that box have the message give you the value of the PartPlant.MinOrderQty field. If it shows nothing (a blank value), then the PartPlant record doesn’t exist yet (so it isn’t possible to update it).