I have a custom object that I am developing a staged progression for. For the sake of easy discussion, let's just go ahead and call this Object object which has a picklist field Object Stage.

I have so far been tracking the progression through this stage by stamping the datetimes directly on the record like so:

stage_1_dt__c = '2020-01-15T15:55:55.000+0000'
stage_2_dt__c = '2020-01-11T11:11:11.000+0000'
stage_3_dt__c = <null>


Which is just messy in my opinion. It also

I'm thinking of converting this instead to a separate custom object Object events which, each record would be a child of the parent Object object and would have usually have a 1-1 association to the stages. The main benefit to handling things this way is that I want to make a timeline because an Object object record can move back and forth along the Object stage "progress bar". But I'd like to see those stage movements all from one datetime field instead of trying to recreate them across a datetime field for each Object stage + field history.

Open to any and all suggestions.

  • Field history object is basically similar to your proposed custom object solution. And you mentioned 6-7 fields, what are these fields for? – Hengky Ilawan Jun 23 '20 at 1:02
  • It is but I've found field history difficult to work with outside of apex and unfortunately, my solution has to be directly soql compatible to the easiest degree possible. So doing a relational join via soql should be fairly easy. Clarified the question to address your 6-7 fields (that was related to the # of datetime fields that correspond to each stage for tracking when it entered that stage) – sgoley Jun 23 '20 at 13:08
  • If you track the history for Stage field, every time it is changed, it would create a new history record. So I think you should be able to query like this SELECT NewValue, CreatedDate FROM ObjectHistory WHERE Field = 'Stage' ORDER BY CreatedDate. Or did I misunderstand your point? – Hengky Ilawan Jun 23 '20 at 13:31
  • That's useful - what if I wanted to track over kinds of "events" that happen to this record besides that one field change. Which would include things like Object object creation, related task creation, field changes like movements through the stage, but also other "types" of events besides just field changes. – sgoley Jun 23 '20 at 14:05
  • Object creation is always tracked by default if you enable the history tracking for the object. Would you consider using Feed Tracking feature? It can track Tasks/Events and all the related objects. – Hengky Ilawan Jun 23 '20 at 14:30

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.