
I'm trying to create a formula that displays a flag for leads where the status has been changed in the last 0-21 days, 21-28 days, and 28 or more days, but I cannot figure out what Field Name displays the Edit Date.
Here is a sample formula, where "StatusEditDate" is the Edit Date from the Lead History:
if(StatusEditDate<(TODAY() - 28), IMAGE("#", "Red"), (
if(and(StatusEditDate>=(TODAY() - 28),StatusEditDate<(TODAY() - 21)), IMAGE("#", "Yellow"), (
if(and(StatusEditDate>=(TODAY() - 21),StatusEditDate<=(TODAY())), IMAGE("#", "Green"),
IMAGE("#", "NA")
)))))
Some background information: We've enabled history settings, and have confirmed that Edit Date is available/accurate in Lead History report.
답변 3개
So if you're referring to the field on the Lead History object created as a result of the Field History Tracking turned ON, then we really cannot do this.
We cannot access fields on the Lead History object from within the Lead object neither do we have options to create fields on the Lead History too!
As a workaround, you'll need to setup a custom solution to this! Like we might need to setup a Date/Time field on the Lead to store the Last Date/Time when the Status was changed say - Last Status Changed On. This will be populated by means of a Workflow Rule + Field Update(Workflow Rule actually would observe for changes in the Status field and the Field Update would populate the Date/Time).
Then you can refer this field[Last_Status_Changed_On__c] in the Formula Field.