Added code to detect when work order already exists and to update the list id and edit sequence in that case.