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
GoForceGoGoForceGo 

Using Object History and Status to find the duration an Object was in a given status.

I have a custom object with a status field - New, Working, ECO Needed, ECO Created, ECO Released and Closed.

I want to know how long the object stayed in each status.

I am how I accomplish this. History table for this object would obviously capture when the status of the object changed.

However, I can't figure out how to create a report that would calculate the difference between these time stamps.

For example, If I go from New to Working at 10:30 today and then go from Working to ECO Needed at 2:30pm two days from now, I know that
I was in status "Working" for 2 days and 4 hrs.

Another way to do this is to create Fields called "Timestamp when Entered New", "Time Stamp When Entered Working", "Time stamp when Entered ECO Needed".

Set these fields using workflow rules as Now - i.e when object gets a status New, capture that time point.

However, I was hoping there is a more generic way - If i add a new status field, I have to add another custom field etc...

History seemed like the way to go, but seems like one can't manipulate the history table through reports or custom formula fields.





Message Edited by GoForceGo on 07-30-2008 12:54 PM
FreshFresh
I thought there was some native Salesforce functionality that did this, but after a quick look I'm not finding it (it may be worthwhile to invest some more time researching it). Without that, you could create a separate date field for each stage, and then have workflows that enter the date that the opp goes to that stage in the custom date field. Then, have a formula field for each stage that calculates the amount of time it was in the stage....

Good Luck!
GoForceGoGoForceGo
Yeh, I can do this with new formula fields, but it is fragile.

I am not sure how to do it generically - I was hoping I could create a report.