Hey All, I am trying to add multiple lines in a Sa...
# suitescript
h
Hey All, I am trying to add multiple lines in a Sale Order through MAP/REDUCE script I am loading record in every map iteration and add 50 rows in that sale order and then repeat this for the same sale order But after 2 or 3 iterations it returns an error " *SSS_USAGE_LIMIT_EXCEEDED*" I want to add almost 1000 lines in single sale order, can anyone tell me is this possible? Additionally, Error is generating on line Record.Save({})
s
Might be better to CSV upload this if possible, its better suited
s
Why would you want to save the same sales order more than one time? Why not add them at all once?
s
they must be doing something else that incurs governance when building up the line?
actually, hold on - if the error is occurring on record.save() then it's likely some other script/workflow at fault.
h
@Sandii Can I add more than 500 lines at once? I had tried this but I got the same error when no of lines more than 200 , it works fine if we add less than 100 or less
@stalbert There is no active workflow on Sales-Order and Yes , I am adding lines in the loop to avoid governance issue
s
then check for other scripts - like User Events on the sales order.
s
Adding a line to a sales order costs 0 points, so if you are somehow hitting governance, its nothing to do with your script setting sublist values.
h
Might be I am wrong but I guess Netsutie has some record saving time limit , when I tried with less than 100 lines it executed perfectly but when I tried more than this limit it returns me error "*SSS_USAGE_LIMIT_EXCEEDED*" on record.save() line ------- Now I am creating multiple sales order instead of creating single sale order for more than 200 lines , I have divided my number of lines into chunks of 100 and save copy of sales order with 100 lines each
s
As stalbert pointed out, there is probably a different script executing on save that is causing the governance problem.