You need to sign in to do that
Don't have an account?
protoguy
Is it possible to find out the history of transitions for an opportunity?
Hi - I'm wondering if it's possible to query for the _history_ of an opportunity. That is, if it's Stage is Closed, I'd like to know when it progressed through each of the stages...
Does that make sense? Thanks in advance for your help!
Byron
Does that make sense? Thanks in advance for your help!
Byron
so the fields available here don't include the LastModifiedDate field: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_opportunityhistory.htm
seem to suggest that you can't find out when the status of the deal changed, but if you look at it on SF.com under Opportunity, then you can see a "Last Modified" date which appears to show when the status/ stage changed.
I also see that in the DescribeSObject that it seems like the LastModifiedDate should be queryable from OpportunityHistory.
Anyway, here's the query I made (on a Dev test account):
"Select Amount, CloseDate, ExpectedRevenue, ForecastCategory, ID, LastModifiedDate,
Probability, StageName From OpportunityHistory Where OpportunityID= '006500000085r8GAAQ'"
The error I get is a 'no such field error'.
Lastly, I should offer that what I'm trying to do is gather the data to do some historical analysis on average time spent in stages of deals, and the actual progression statistics to better calculate expected revenue for dealstages based on results. Thanks!
It looks like CreatedDate will give me what I'm looking for and marks when the opportunity changed. tks!
There's a row in OpportunityHistory for each change of the opportunityStage on the Opportunity. The created date column in the OpportunityHistory table indicates when that particular row was created (and therefore when this change to the opportunity was made). This would seem to be exactly what you're looking for.
When i do describe on OpportunityHistory, i see no LastModifiedDate field.
For example, I updated an opportunity stage last week to "Proposal" which at the time was in a Pipeline forecast category. Today I changed that stage's category to Best Case and now the history record's created date shows today instead of last week! I've looked at this for two hours and was sure I was seeing things, but there it is.
I'm beginning to think it's not possible to pull an accurate history if sales processes are being revised.
Mark