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
ABHIKSARKARABHIKSARKAR 

Case Age for Historical Data

Want to calculate the age of historical case data by subtracting the time when the case was in pending status. 

I am able to track the age for any new cases created by tracking two dates. 
1.) Date on which the Case went into Pending stage. 
2.) Date on which the Case went out of Pending stage. 

However, I am not able to update the fields for existing Case data. 

PS: We do have history tracking enabled for Status field. 

Is there a way to fetch the above dates from Case History object . 
surasura
you can use the CaseHistory object to fetch history of above fields .https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_casehistory.htm

ifrom this link you can find about querying histroy data http://salesforcecat.blogspot.com/2014/11/salesforce-history-tracking-access.html
ABHIKSARKARABHIKSARKAR
Thanks for your response. What I meant was I wanted to track the dates on which the status changed to pending . I dont see any such field on the history objects to track that .