I have Po. I want to check if the item lines have changed on after submit
function onAction(context) {
var newRec = context.newRecord;
var oldRec = context.oldRecord;
var newCount = newRec.getLineCount({
sublistId: 'item'
});
var oldCount = oldRec.getLineCount({
sublistId: 'item'
});
if (newCount != oldCount) {
log.debug('result', 'true')
} else {
log.debug('result', 'false')
}
}
return {
onAction: onAction
}
I did it with count line but I want also to check if there any changes in the line and not only the number of the lines