Zoran R-DATAGRAM
08/18/2022, 8:13 PMwhile (loadedEmployee.getLineCount({sublistId: 'recmachcustrecord_bob_wh_employee'}) > 0){
log.debug({
title : 'lineCount while',
details : loadedEmployee.getLineCount({sublistId: 'recmachcustrecord_bob_wh_employee'})
});
loadedEmployee.removeLine({
sublistId :'recmachcustrecord_bob_wh_employee',
line : 0
});
}
loadedEmployee.save();
What’s wrong with this part of code? I am trying to remove all sublist lines with WORKFLOW action script.
No errors, log.debug count 5,4,3,2,1 (after removing lines getLineCount decrease for 1). After .save() I have ALL lines remain!
Workflow action is executed in VIEW mode of record, in the ENTRY state after transition on button click….jen
08/19/2022, 3:33 PMcustrecord_bob_wh_employee
itself? What happens with them if you try to remove via the UI? Do you get bob_wh_employee records that are just orphaned with no value in the parent field, or do they get deleted?jen
08/19/2022, 3:34 PMZoran R-DATAGRAM
08/19/2022, 4:05 PMZoran R-DATAGRAM
08/19/2022, 4:07 PM