BPM Development: Sales Order New Line Event? Uncheck Checkbox When New Line Added To SO

I would like to create a BPM (or another solution) that unchecks a checkbox on the Sales Order Summary tab when a new line is added to the Sales Order.

I’m not seeing anything along the lines of a new line event method? Thoughts? Thanks!

  1. Make a new order
  2. Enable Tracing
  3. Add a line (don’t actually fill in any values)
  4. Disable tracing
  5. View Trace

You should see:

<tracePacket>
  <businessObject>Erp.Proxy.BO.SalesOrderImpl</businessObject>
  <methodName>GetNewOrderDtl</methodName>
  <appServerUri>net.tcp://usdataps00122/MC-UAT/</appServerUri>
  ... irrelevant lines removed ...
</tracePacket>

That means the BO “SalesOrder”, had method “GetNewOrderDtl” called. If you make a BPM on that, it will be executed every time a new line is added.

1 Like

Just curious … what checkbox are you trying to change?

One more thing. BPM’s act on the data and changes made by them might not be reflected in the UI. So if it’s important the the user see the change, you may have to be creative, or do it in a customization.

Calvin - thank you, awesome, I will play with that.

It’s a custom checkbox in the OrderHed table - pricingReviewed_c

But I think I’ve encountered what you’re talking about - I used the SO Update Method and a condition to check when a row was added to the OrderDtl table as the trigger - but it’s not able to operate outside of its scope to change the field on OrderHed via the Set Field action… At least, not that I can figure out so far.

I will examine my options under the UI customization, as yes, I would like the field up to be reflected in realtime.

In addition to the UI not showing the UI control’s updated state, you can run into problems where the UI data doesn’t the DB, so when you go to save you get an error like “Updated by another user…”

A downside to customizations, is they only function when someone is actually using that form. If you were in Quote Entry and created an Order from the quote, none of those customizations happen. But all the SalesOrder BO’s do happen.

Good points to consider I had not thought of - it will take some experimentation to ferret out the pros and cons.

Regarding customizations - any suggestions on how would I go about detecting a new line added to the sales order?

Make a Form Event for event type AfterAdapter for adapter ordApapter.

Then uncomment the line:

// EpiMessageBox.Show(args.MethodName)

and add a semicolon at the end. Save the customization.

Now open that customization up select an order (clicking through the pop-ups from that message box). When they’re all done, select new line and you should get:

image

So that’s the case to use in the AfterAdapter event handler.

Calvin - fantastic, that did it, I greatly appreciate you breaking down HOW to obtain this information!!