Access & update all rows of orderdtl table from sales order entry

Hi All,
I want to access and update all rows of orderdtl. I have used update query by table widget but I can update only one row. Below are the screenshots:






If the CoC box gets checked on line, it should get checked on all:

The ds.OrderDtl table will only exist if one of the order lines has been updated, and will only include that specific Order Line.

Instead of using ds.OrderDtl, you’ll need to use the regular OrderDtl table. the same criteria should work, though.

Also, this is going to trigger every time you save an update to an order. So if you make a change to the PO number, or change the quantity of an order line, or add a comment, it’s going to trigger this BPM. If you’re only looking to do this when something specific is selected / updated / changed / deleted, then you’ll need to add more criteria.

Hi @kve
Thanks for reply.
If I just want to test it out whether it updates on the current order with 5 lines, I used the below steps, but it still did not work. It works on one line only.
I can apply the conditions later.


There’s no option select Erp.Ordrdtl table here

I used the below mapping:

Yeah, that’s definitely a problem. Not sure how to go about solving that using BPM widgets.

I can think of a couple solutions right now that would work:

  1. Use a custom code widget in the BPM to access the other Order Lines
  2. Add a method to your customization that checks all the boxes and saves changes.

Thanks
Can you please help with the second point, adding a method that checks all boxes and saves changes?

If the COC checkbox is required for all lines equally move the checkbox to the header

Why have individual checkboxes if they are all going to either be checked or not

2 Likes

@josecgomez i tried looking for checkbox header field but no information for it comes up it field help.
if I can access the header that would solve all the problems. :slight_smile:

Those are custom fields, so you will need to duplicate them on the OrderHed and regen the schema. Then on Update set all of the detail records or just use them from the header in the next part of the process.

Hi @gpayne
I did regen the schema:
OrderHed->CoCrequired2_c
OrderDtl-> CoCrequired_c
when CoCrequired2_c is set to true, all the lines in Orderdtl for CoCrequired_c should also be true.
I tried using Update table by widget, but it is not working
Can you please help?

Thanks





The binding should be to the Orderhed.CoCRequired_c field. You do not have any relations fields. You need Company and OrderNum.

On setup table mapping screen?
image

yes.

Does this look correct for relation?
Do I have to create binding for 414-CoCRequired_C to Orderhed.CoCRequired_c?
Thanks

The query needs to be on OrderHed to get the data to set on OrderDtl

Sorry, I am confused. Did you mean in the query for update table?

Yes. the display fields need to be OrderHed Company and OrderNum for the relationship and CoCRequired_c so those values can be set on the OrderDtl rows.

Ok, please let me know if this is correct now:
The phrase build is below and the display fields:



with the following mapping:

The Dtl CoC field should be bound to the Orderhed.CoC field

Changed to it, but when I click on orderhed.CoCRequired2_c, the Ordtl lines dont update.
Thank you so much for help.

Upload the bpm and i will take a look.