API to release picking batch doesn't work when delivery is already assigned
Hello, I am using WSH_PICKING_BATCHES_PUB.CREATE_BATCH and WSH_PICKING_BATCHES_PUB.RELEASE_BATCH to create a picking batch and then release it.
It uses a Release Rule where autocreate delivery is set to Yes and it contains a ship confirm rule.
My requirement is to have the users manually assign the delivery lines by choosing Autocreate Delivery in the forms. Then, the api runs and ship confirms the delivery.
The problem that I am having is that because the release rule says autocreate delivery = yes, then the release_batch API doesn't work. If I un-assign the lines from the delivery first, then run the API, it works fine.