Here, we have used lineInit() to get the value.
declare the variable as global;
itemQuantity = currentRecord.getCurrentSublistValue({
sublistId: ‘item’,
fieldId: ‘quantity’
});
Then use the value where we need.
currentRec.setCurrentSublistValue({
sublistId: ‘item’,
fieldId: ‘quantity’,
value: itemQuantity,
ignoreFieldChange: true,
});
return true;