1

I'm tracking changes to a field called Status, i have a requirement to produce a report that shows the number of days between a change from one status to another specific status. This can happen a number of times for a particular record so i can't just create a couple of date fields on the object to capture these changes.

Not possible in report builder so does anyone have any thoughts about how to go about this in apex?

Cheers

  • daysBetween method of the Date object? salesforce.com/us/developer/docs/apexcode/Content/… – Sergej Utko Aug 7 '13 at 8:48
  • its more the bit about getting the relevant records together rather than the actual date calculation e.g. to form this sort of structure from the history object: – paul Aug 7 '13 at 8:53
  • ID : Edit Date1 : Old Value 1 : New Value 1 : Edit Date 2 : Old Value 2 : New Value 2 : Days between 1 & 2 – paul Aug 7 '13 at 8:54
  • I guess you'll need a related list of records for that object and a trigger that will create a new record whenever the value have changed on the Status field. Then you'll be able to report on children of the History Object. Is that what you're after? I can provide code examples of how to achieve that if you require. – Boris Bachovski Aug 7 '13 at 10:31
  • trying to avoid creating an additional custom object to achieve this, particularly given SF's rather stingey custom obj limits... – paul Aug 7 '13 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.