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
DPFrazierDPFrazier 

Accessing historical data via API; Historical data for custom objects

Are opportunity history data (such as probabilities and stage durations) accessible via the API?
 
And can historical data be stored and accessed for custom objects?
 
Thanks,
Dean
Gareth DaviesGareth Davies

Hi Dean,

Yes they are.

Use developers' sidekick http://www.upside-outcomes.com/products/devkick.htm to have a look at the Schema definitiion. The table you are looking for is OpportunityHistory.

Also have a look at the Sales Sidekick test drive on the appexchange http://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000002OKisAAG (you'll need IE 6 for this)

If you look at the section marked "30 Day Opportunity Performance" you will see that we have used this table to reconstruct the state of each opportunity 30 days ago so that sales people can track opportunity progress.

Custom objects do not have such a table available. I beleive that there is an audit trail of objects that is kept for Sarbanes-Oxley compliance - if you can get access to this store then you may be able to do something similar. Failing that you will need to take stamped impressions of the data at either fixed intervals or as they are changed. To do this will require using custom code.

Hope that helps

Gareth