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
Always ThinkinAlways Thinkin 

Can you detect IsTracked for tracked fields?

Is there a way to tell whether a field is tracked? I'm using the Metadata Objects application, which is wonderful, and I want to enhance it to show me which of my fields are tracked in Field History Tracking. I had hoped that like isDeleted, there might be an isTracked boolean that can easily be identified.

 

Thanks,

Luke C

Best Answer chosen by Admin (Salesforce Developers) 
Always ThinkinAlways Thinkin

Looks like Salesforce delivered already! The latest API guides references them here:

http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/customfield.htm

as TrackHistory and TrackFeedHistory.

All Answers

TehNrdTehNrd

I don't think this is possible.

 

I  thought this type of functionality might be located in the Describe Field Result Methods but I did not see it listed there.

 

You could query the table to see what fields are tracked but his presents a whole seperate list of issues...field could be tracked but have no history record yet, field is no longer tracked but has old history records, etc.

 

-Jason

 

 

Always ThinkinAlways Thinkin

Well then if it's not possible now, it should be!

 

Vote here:

https://sites.secure.force.com/success/ideaView?c=09a30000000D9xtAAC&id=08730000000KrDfAAK

Always ThinkinAlways Thinkin

Looks like Salesforce delivered already! The latest API guides references them here:

http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/customfield.htm

as TrackHistory and TrackFeedHistory.

This was selected as the best answer
yaaangyaaang

This seems to only be available for CustomFields, unfortunately. Not sure when this will become available for standard fields as well.