3

Editing a Closed Case will automatically change its status from 'Closed' to 'Pending' and then when the edits are saved, the Case is then 'Closed' again.

I would like to create a Counter that counts how many times the Case is 'Closed', potentially using the 'Closed' Checkbox data type.

I am open to writing an Apex trigger, but would appreciate some insight on a way to just use standard formulas if possible.

2 Answers 2

6

This is a pretty simple workflow rule.

Criteria

  • IsClosed = true
  • Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria

WFR Criteria

Action

  • Field Update (Field = Closed Counter)
  • Formula: IF(ISNULL(Closed_Counter__c), 1, Closed_Counter__c + 1)
6
  • Thanks! I actually went back and tried a version of this. WFR: created and every time edited( ISCHANGED(CloseDate)), Field Updater:(Closed_Counter_Field_Updater__c + 1) and that doesn't seem to be successfully updating the number field
    – GPP
    Dec 10, 2015 at 19:26
  • I know this is slightly different than your solution, but the similiarites are close enough to make me wonder if I am missing a key piece of linking the Workflow together
    – GPP
    Dec 10, 2015 at 19:27
  • 1
    The field name is actually ClosedDate. Is that a typo? Otherwise, perhaps the Case is not actually reopening and closing? Does the ClosedDate actually change?
    – Adrian Larson
    Dec 10, 2015 at 19:32
  • 1
    It looks like you didn't include the ISNULL check. Is the value being initialized to 0?
    – Adrian Larson
    Dec 10, 2015 at 19:50
  • 1
    Let's chat about it? I think your criterion makes more sense.
    – Adrian Larson
    Dec 10, 2015 at 19:55
2

A formula field isn't the right tool for the job here. You could probably make it work through some convoluted means, but what you're looking for here is a Workflow rule (and field update).

Something along the lines of

ISCHANGED(Status) && ISPICKVAL(Status, 'Closed')

The field update would simply increment a number field (which you would need to create if you haven't already), and you'd be on your merry way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .