I had to add a new field to Sales Orders line (bab...
# general
s
I had to add a new field to Sales Orders line (babbel_qty). Some of our orders has many lines, up to 10k, I know it's crazy. I need to update the qty on the line. I have to load the orders, search the item, update the qty and save it. It takes forevery. Is there's a trick to update only the qty directly without loading the SO ?
c
unless you can csv import update them you have to load it because you are accessing the sublist.
are you doing this with a map/reduce and using all of the available queues?
s
I just to do a simple select and update using submitfield
r
you can use MR, From input stage, pass Sales order internal ID to map stage as key. Iterate through the lines in map stage and build the logic to update the quantity. even if you have to update quantity in 10k rows, with simple calculation, not having some searches to get the desired quantity and no other userevent script is slowing the process of saving the SO. if you require some searches to be used on item record or something to be used, try to create a dictionary in either input stage or map stage and use that. Per sales order it should not take more then 1-2 minutes at max.