which should we use in Map/Reduce script? setSubli...
# suitescript
v
which should we use in Map/Reduce script? setSublistValue or setCurrentSublistValue?
n
It depends on how you are loading the record. If the isDynamic parameter is true, then you can use record.selectLine() record.setCurrentSublistValue() record.commitLine() To mimic UI behavior. If isDynamic is false, then you have to use setSublistValue()
Unless you need the dynamic mode to populate other fields, I would suggest setting isDynamic to false and using setSublistValue()
Dynamic mode is easier for some things because you can automatically load currency when you select a subsidiary, for example. The order of API calls matters. Standard is easier to use.
s
standard mode is also generally faster executing.