Trying to set the department, on the sublist, in b...
# suitescript
s
Trying to set the department, on the sublist, in beforeLoad. Is there anything in here that you can spot that is wrong? It isn't setting it even though the data is right
Copy code
for (var i = 0; i < count; i++)
            {
                newRec.setSublistValue({
                    sublistId: "item",
                    fieldId: "department",
                    line: i,
                    value: dept
                });
            }