We are trying to make a hierarchy of opportunities for the same customer, we have created a lookup from opportunity to parent opportunity, and when we convert an opportunity to a quote, and then create a contract (salesorder) from that quote, we would like to have the contract lines of that new contract be under another contract that would be associated to the parent opportunity, and then delete the newly created contract. We have made a new plugin, and in this we have managed to change the contract lines to be under the main contract and not the child opportunity contract, but haven't been able to find a way to definitely delete the new contract after.
The system creates a record in the entity msdyn_projectcontractlinesplitbillingrule that relates the customer and this contract, this record is preventing us from deleting the contract, but neither the customer nor the contract in said record can be changed, and the record itself cannot be deleted, how could we go about to be able to delete this new contract after we have changed the contract lines to be under another contract?
Thanks in advance