We can remove the child record lines from the parent custom record using the following suitescript code.
for (var i = lineCount - 1; i >= 0; i--) {
    custrec.removeLine({
        sublistId: 'recmachcustrecord_jj_landed_cost_volume',
        line: i
    })
}
But the Allow Delete checkbox should be enabled in the custom record setup. Otherwise, the lines will not be removed from the custom record.
