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
blakeLLblakeLL 

Using a case status update in a formula

In a formula on a custom case field, can I use the most recent date/time stamp of when a case was changed to a certain status. For example, I want to have a formula that is based off of the last time a case was set to STATUS X.

JakesterJakester
If you have Enterprise Edition or higher you can have a workflow rule that fires when the status changes. And if you audit the Status field then you definitely would be able to run reports to show when those changes happened. You say you want to write a formula - can you be more specific?
blakeLLblakeLL

I have professional edition. Here's my basic formula to calculate a Due Date on a case:

Case(Type,
"Problem", Date_of_Assignment__c +1,
"New Letter", Date_of_Assignment__c +2,
"New Customer", Date_of_Assignment__c +5,
),

Right now Date_of_Assignment is a manual entered field, that the user populates when they change a change from status of "Waiting on Customer" to "Escalated" or "Open".

Is there a way to determine the date and time that the case was most recently changed to "Escalated" or "Open"? Furthermore, is there a way to determine the date and time that the case was most recently changed by user1, user2 or user3 to "Escalated" or "Open"?

JakesterJakester
Turning on auditing for the Type field would do all of that, and it's easy. Just go to customize->cases->fields and click Set History Tracking, then check the box next to Type
blakeLLblakeLL
I am currently tracking the changes in this field, and I can manually tell when it was by looking at the case page. However, what I need is a way to pull the date/time from the history automatically so it can be used in a formula.
JakesterJakester
Ah - well for that I think you'd need triggers, and for that you'd need Apex, and for that you'd need Enterprise Edition. Another option, if you're a SQL guy, is to get ForceAmp's excellent product called DBAmp which will replicate your SF data down into a local SQL server where you can write your own queries. You can even write update queries which would, on a scheduled basis, check for new changes of this type and write the date to a field on the record. I've done this many times in my salesforce instance and am very pleased with how it works.