Symptom
You are using Data Workbench in order to delete an opportunity in the system.
However, you got this error for all the opportunities you tried to delete:
"Opportunity with ID XXXX can't be deleted because of existing follow-up documents."
Environment
SAP Cloud for Customer
Reproducing the Issue
- Go to Data Workbench work center.
- Select Export view.
- Select object.
- Filter the opportunity using ID.
- Click Next.
- Click Export Data.
- Download the file from Monitor.
- Open the file.
- Add a column "ToBeDeleted" to the end of the row.
- Enter value "TRUE" to the column "ToBeDeleted".
- Now perform an update by going to Import view.
- Select Individual Object and Update.
- Select object as opportunity.
- Upload the edited file and then update.
- You get the error: "Opportunity with ID XXXX can't be deleted because of existing follow-up documents."
Cause
This is the expected behavior. Deletion of opportunity is restricted and if there are follow-up documents e.g. any activity ,related opportunity , sales quote or ERP documents.
Resolution
To proceed with the deletion of the opportunity, you need to delete first the related follow-up documents and then the opportunity.
This also happens when the opportunity has been replicated from third party system to c4c, and hence, cannot be deleted using OData.
Keywords
Opportunity, DWB, Error, Opportunity with ID XXXX can't be deleted because of existing follow-up documents; , KBA , LOD-CRM-INT-DWB , Data Workbench , How To