Phillip
01/19/2021, 9:16 PMbattk
01/19/2021, 9:19 PMPhillip
01/19/2021, 9:21 PMPhillip
01/19/2021, 9:21 PMbattk
01/19/2021, 9:23 PMPhillip
01/19/2021, 9:24 PMalien4u
01/19/2021, 9:26 PMPhillip
01/19/2021, 9:27 PMalien4u
01/19/2021, 9:27 PMPhillip
01/19/2021, 9:28 PMalien4u
01/19/2021, 9:29 PMparseInt(numbertoset2);
without radix.Phillip
01/19/2021, 9:29 PMalien4u
01/19/2021, 9:29 PMPhillip
01/19/2021, 9:31 PMalien4u
01/19/2021, 9:32 PMPhillip
01/19/2021, 9:32 PMbattk
01/19/2021, 9:34 PMbattk
01/19/2021, 9:34 PMbattk
01/19/2021, 9:35 PMPhillip
01/19/2021, 9:37 PMbattk
01/19/2021, 9:37 PMbattk
01/19/2021, 9:37 PMbattk
01/19/2021, 9:38 PMrequire(["N/record"], function (record) {
var soRecord = record.load({
type: record.Type.SALES_ORDER,
id: "28446",
});
//Get the number of line items
var lines = soRecord.getLineCount({
sublistId: "item",
});
for (var x = 0; x < lines; x++) {
//for loop
var numbertoset2 = x + 1;
numbertoset2 = parseInt(numbertoset2);
var n2 = numbertoset2.toString();
soRecord.setSublistValue({
sublistId: "item",
fieldId: "custcol_kit_number",
line: x,
value: n2,
});
saveneeded = "1";
} // end of for loop
log.debug({ details: "gothere = " + saveneeded });
if (saveneeded === "1") {
var recId = soRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true,
});
log.debug({ details: "savedrecord" + recId });
}
});
alien4u
01/19/2021, 9:38 PMPhillip
01/19/2021, 9:38 PMPhillip
01/19/2021, 11:29 PMLee Hopper
01/22/2021, 12:29 AMPhillip
01/22/2021, 3:24 PM