screnshaw
09/09/2022, 4:48 PMJan Petri
09/09/2022, 5:11 PMJan Petri
09/09/2022, 5:11 PMscrenshaw
09/09/2022, 5:26 PMJan Petri
09/09/2022, 5:33 PMscrenshaw
09/09/2022, 5:34 PMJan Petri
09/09/2022, 5:34 PMJan Petri
09/09/2022, 5:34 PMscrenshaw
09/09/2022, 5:34 PMscrenshaw
09/09/2022, 5:53 PMJan Petri
09/09/2022, 5:57 PMscrenshaw
09/09/2022, 6:23 PM{
const salesOrd =record.load({
id: createdFrom,
type: record.Type.SALES_ORDER,
isDynamic: false
});
newRec = record.load({
id: newRec.id,
type: record.Type.ITEM_FULFILLMENT,
isDynamic: false
});
logIds(newRec, salesOrd, 1)
}
function logIds(newRec, salesOrd, seq) {
const lineSysIds = [];
const lineSysIdsSOs = [];
if (newRec) {
const cnt = newRec.getLineCount('item');
for (let i = 0; i < cnt; i++) {
lineSysIds.push(newRec.getSublistValue({ sublistId: 'item', fieldId: 'sys_id', line: i }));
}
}
if (salesOrd) {
const cntSO = salesOrd.getLineCount('item');
for (let i = 0; i < cntSO; i++) {
lineSysIdsSOs.push(salesOrd.getSublistValue({ sublistId: 'item', fieldId: 'sys_id', line: i }));
}
}
if (!seq) {
seq = 0;
}
log.debug('grr' + seq, { lineSysIds, lineSysIdsSOs });
}
screnshaw
09/09/2022, 6:23 PM{
lineSysIds: [
"7549829923287858"
],
lineSysIdsSOs: [
"7549829432570145",
"7549829432252979"
]
}
screnshaw
09/09/2022, 6:23 PMJan Petri
09/09/2022, 6:40 PMscrenshaw
09/09/2022, 6:40 PMscrenshaw
09/09/2022, 6:41 PMJan Petri
09/09/2022, 6:47 PMmightyd3
09/09/2022, 6:57 PM