I used multithreading in CSV, to create invoices p...
# suitescript
d
I used multithreading in CSV, to create invoices parallelly, script deployed on the invoice (AS) updates 1 custom record field to some value by total/sum up with an existing value in the field, the issue is instead sum up it overrides with last value.
s
Based on this description alone, it's hard to follow the logic or why it's not working. You say the deployed script updates 1 custom record field to some value by total/sum. What is the script summing up? A value from multiple lines in the invoice? Also, are these single line invoices, or multi-line? I have had a lot of trouble with multi-threaded CSV imports when dealing with multi-line transactions, so that is one instance where I usually disable multi-threading.
Can you share the code that gets the total/sum value and updates the custom record field?
d
@scottvonduhn I dont have code handy, it captures the total amount from the invoices, there is a custom record which has customer field and amount field, the amount will be updated ( get existing value and add up with the invoice amount ) and save the custom record
s
Without seeing the code, it's hard to say what is wrong. There may be a bug in the code that gets / sets the value.