If work order is not in use, you can delete the work order
If time receipt, issue or other linked document is available, it's not possible to delete the work order
Return error if not possible
DELETE Workorder(DocEntry as number)
let ll_DocEntry=600333;
let r=bsl.delete("Workorder("+ll_DocEntry+")");