Page 1 of 1

OpportunityHistory vs OpportunityEditHistory

Posted: Wed Jan 30, 2019 10:11 am
by ivandevpartner
Hello,
I have noticed that the API supports calls to OpportunityHistory and OpportunityEditHistory + OpportunityEditHistoryFieldChanges tables.
Bh docs, at least as far as what I dug through, do not specify the difference between those two tables in terms of history keeping logic.

Some opportunities that I see have a status field different to the one in their latest OpportunityHistory record.
Could it be that the OpportunityHistory table only maintains a record of past values and not the current one? If so, what strategy should be used to keep track of opportunities' fields or shall I use the OpportunityEditHistory + OpportunityEditHistoryFieldChanges tables?

What is interesting is that although the status values differ, the dateEffective values are the same in both Opportunity and their OpportunityHistory records.

Re: OpportunityHistory vs OpportunityEditHistory

Posted: Tue Feb 05, 2019 12:58 pm
by DanJSupport
Hi Ivan,

The OpportunityHistory corresponds to the Status History section in the Opportunity's Activity Tab. It is a tracking of a few key fields such as the status, deal value, win probability and effective date.

The OpportunityEditHistory and OpportunityEditHistoryFieldChange correspond to the full edit history section. It tracks edits to all the fields.

Most of the time the fields in the {entity}History are the ones people are looking for so it is a bit easier to query that than querying the {entity}EditHistory and {entity}HistoryFieldChange

Re: OpportunityHistory vs OpportunityEditHistory

Posted: Fri Feb 08, 2019 9:32 am
by ivandevpartner
Thanks for the reply.
I am interested in the status field so looks like the simple OpportunityHistory approach would be a bit more straightforward.
However it is still unclear to me why the values of the "status" field are not the same in the OpportunityHistory and the Opportunity itself.

Re: OpportunityHistory vs OpportunityEditHistory

Posted: Mon Feb 11, 2019 9:45 am
by DanJSupport
Hi Ivan,

Could you explain what you mean? The values for Status should be the same as what is in the history. It's possible that there are some statuses that may have been removed from the field mapping by an Admin, or an API added a different status than is available to users in the App, but for the most part they should be aligned.