- Salesforce Advanced Administrator Certification Guide
- Enrico Murru
- 413字
- 2021-06-24 12:24:13
Field history tracking
After answering the question Who sees what?, now we are going to answer the question, Who did what?
With field history tracking, we know which user changed which field on a given record. This information is displayed on the history list (that we should add to each page layout that we are using):

History data is retained for up to 18 months if we access a record through a browser or 24 months for a record accessed via API (for example, Data Loader, Workbench, or any other tool) by querying the ObjectHistory object (for example, AccountHistory, or CustomObject__History for custom objects).
Here is an example of the SOQL query that delivers the same result as the Account History list of the previous example:
Select CreatedBy.Name, CreatedDate, Field,OldValue, NewValue from AccountHistory Where AccountId = '0011i000007K2LEAA0' Order By CreatedDate DESC
This leads to the following:

There are a few limitations regarding field history tracking:
- The old value is not tracked for text fields with more than 255 characters.
- Old/new values are not automatically translated—that is, if you have a Pizza Type picklist whose value is changed by an Italian user to Al Salame, it won't display as Pepperoni for an English-speaking user (all translations referred to here are made with the Translation Workbench; for more information, refer to Salesforce Support at https://help.salesforce.com/articleView?id=workbench_overview.htm&type=5).
- The field's label is always translated into the current user's language (for example, Pizza Type will be shown to an Italian user as Tipo di pizza).
- Date, date/time, and number fields are always displayed with the viewing user's locale.
- If an Apex trigger causes a change in a field that the current user doesn't have access to, the change is not tracked. Field history always follows field-level security settings.
- Time fields aren't tracked in the field history list.
To enable field tracking, jump to Setup | Object Manager | ObjectType | Fields & Relationships and click the Set History Tracking button:

- Big Data Analytics with Hadoop 3
- ABB工業(yè)機(jī)器人編程全集
- 網(wǎng)上沖浪
- Mastering VMware vSphere 6.5
- Effective DevOps with AWS
- Implementing AWS:Design,Build,and Manage your Infrastructure
- 影視后期編輯與合成
- Mastering Geospatial Analysis with Python
- Linux Shell編程從初學(xué)到精通
- 21天學(xué)通Linux嵌入式開發(fā)
- ZigBee無線通信技術(shù)應(yīng)用開發(fā)
- 寒江獨釣:Windows內(nèi)核安全編程
- Natural Language Processing and Computational Linguistics
- 電腦故障排除與維護(hù)終極技巧金典
- 教育創(chuàng)新與創(chuàng)新人才:信息技術(shù)人才培養(yǎng)改革之路(四)