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
MRosiMRosi 

Field history

Hello,

 

I have a custom object called Item with a picklist field called Status.

 

I would like to keep a history of every status change with a timestamp and who made the change.

 

I seem to remember that the force.com platform can do this but can't find how.

 

Is this a standard function I can use or do I have to implement another ItemStatusLog object and add a new instance with a trigger?

 

The reason I want a log is to be able to do an analysis later on to find bottlenecks (when it took a long time to change a given status), etc. 

 

Thanks,

 

Matt

 

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

I think it can be done natively, just go to your object Setup > App Setup > Create > Objects > YourObject

 

There you can see "Set History Tracking" button in "Custom Fields & Relationships" section. Just select your picklist field from the list and click save. Now you can add a related list from page layouts "YourObjectName History". If there is any change in the picklist value it will be maintained in that related list automatically.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Ankit AroraAnkit Arora

I think it can be done natively, just go to your object Setup > App Setup > Create > Objects > YourObject

 

There you can see "Set History Tracking" button in "Custom Fields & Relationships" section. Just select your picklist field from the list and click save. Now you can add a related list from page layouts "YourObjectName History". If there is any change in the picklist value it will be maintained in that related list automatically.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
MRosiMRosi

Thank you very much! That is great advice.

 

It works. According to the online docs you cannot use this facility to track Modified By, but in fact it does provide a column called User which seems to provide the same information about who made the change.

 

This is being used in a factory in Sendai that is involved in the cleanup. Thanks!

 

Best regards,

 

Matt