So in my code i've implemented a line that should delete my warehouse shipment once it's been posted. Reason for that is because the customer wants to create a new one for the next partial shipment rather than opening the old one. Now implementing that in code is not really an issue but it is when the document's state is set on Released. So i was wondering in what way i can set the status of my warehouse shipment from released to open trough code so that i can delete the record?
Thanks in advance.
EDIT:
I found out there is a field "Status" that can be modified but appearently not after the action of posting since i get the error message that some fields might not have been updated