I'm trying to remove the line
//remove existing inventory detail //
var inventory = Rec.getCurrentSublistSubrecord({sublistId: 'item',fieldId: 'inventorydetail'});
var line_count=inventory.getLineCount({sublistId: 'inventoryassignment'});
for(var b=line_count-1;b>=0;b--){
inventory.removeLine({
sublistId: 'inventoryassignment',
line: b,
ignoreRecalc: true
});
}
I get the message at var inventory = Rec.getCurrentSublistSubrecord({sublistId: 'item',fieldId: 'inventorydetail'});