The length comparison does not even worth it becau...
# suitescript
a
The length comparison does not even worth it because as I mention if somebody delete one line and add another line automatically that length comparison fails which make it just a waste of time and code... Comparing Items with the values still not the best approach... I could have a line which have a linked record on that line(any kind) WOs, POs, Custom linking... if somebody remove the line and add the same item back with the same quantity still fails...
@suitecloudfanatic @jmacdonald Actually my previous statement was wrong a quick length comparison and returning false on a function to check if the array are equal could save a lot of time and unnecessary processing if you know from the beginning that they are different. The bad news is there is not unique line key on new lines on
beforeSubmit
event so values comparison is needed where you need to also include line number otherwise if you have duplicate items it will also fail...
s
What did you end up doing?