function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mkbkemkbke 

Is there a way to delete something from the Opportunity History table?

Is there a way to delete something from the Opportunity History table? I'm not having any success. Here's what I did.
 
I queried the Opportunity History table by Opportunity ID. I wanted to clean up some incorrect entries in the history ex. someone put in a wrong close date and then corrected it, so I wanted to delete the instance of the wrong close date. I highlighted the row that contained the opportunity History ID of the wrong close date and selected Delete Object from the SFconnector menu. I got an error message.
Error generated by request: One of the records in the batch call resulted in an error.Examine the records to determine which ones failed. Exception Code 5102.
 
There was no indication on the record as to why it failed.
 
What should I do differently?
Thanks,
Mkbke
benjasikbenjasik
I believe you need to delete the opportunity.  History is history today, you can't change it.  What's the use case for wanting this?
mkbkemkbke

I believe the use case would be to have a correct history of the opportunity by being able to delete the erroneous entries. The opportunity I'm trying to correct has many assigned and completed tasks, so I don't want to delete the entire opportunity to correct one wrong line in the history. From your message, it sounds like the delete function of the connector doesn't work on opportunity history. Is that correct?

Thanks,

Mkbke

Scot.ax122Scot.ax122
Yes, you're right ...

It's the underlying salesforce API which doesn't provide for any updating (or deleting or inserting) of the OpportunityHistory object.

George-Alexandru AndreiGeorge-Alexandru Andrei
https://help.salesforce.com/articleView?id=000313506&language=en_US&mode=1&type=1