Question: I'm trying to delete A-AM123456789 and I received the following error "This amendment cannot be undone since invoicing has already occurred past the end of the previous version of the subscription." However there are no transactions or invoices(i deleted all the associated invoices) against Subscription: A-S123456789. Please advise what is limiting the deletion of this amendment.
Once an invoice has been generated for an amended subscription, Zuora will no longer allow you to delete that amendment. If you attempt to delete an amendment that has already been invoiced, Zuora will pop-up an error message signaling that the action cannot be completed. The error message: This amendment cannot be undone since charges modified by this amendment have already been invoiced
You can also use the delete() API call on an Amendment object to erase the latest amendment made to a subscription only if an invoice has NOT been generated for it. Possible workaround: If the invoices were not deleted
The reason you are unable to delete the cancelled amendment is because the Bill Run that processed the invoices has locked the segment of the Amendment. If the Bill Run was ran for a single account then you can delete the Bill Run and then delete the amendment. This is by design to follow best practices and comply to audit trail.