A common questions asked in CloudExtend is how changes to Salesforce records are tracked as well as what happens to records that are deleted via CloudExtend.
ℹ️ This information is provided by Salesforce for your convenience. Please use the links below if you're looking for the most recent updates from Salesforce.
There are 2 ways to track changes done to fields under objects in Salesforce:
Field history tracking
We can select certain fields to track and display the field history in the History related list of an object. The field history data is retained for up to 18 months. Field history tracking can be done for both standards as well as custom objects.
If we want the changes done to appear in the Chatter feed then we can enable Feed tracking. It's present in Setup > Quick Find > Feed Tracking. The drawback of this is with Chatter feed tracking enabled you don’t have a history object created for your custom object so if you want to query the changes for any other processing or reporting purpose you can’t get that directly. Also tracked feed updates that are older than 45 days and have no likes or comments are deleted automatically
How to Enable History Tracking in Salesforce
Go to Setup > Object Manager
Select an Object then go to Field and Relationships and click Set History Tracking.
Select the fields to track and click Save You can only select up to 20 fields.
How to View Object History in Salesforce
Go to Page Layouts and select layout to be updated
Scroll down to Related List> select the history object and drag down to the Related Links section
Snippet on adding Contact History
3. Open a record for the object you enabled the history tracking. Go to Setup> Edit Page.
4. From the Component section, drag and drop the related list to the Related tab and click Save.
❗❗ Note: The history section will only show logs after the History Tracking has been enabled in Salesforce.
Pull Object Track History from Salesforce using CloudExtend
Create a new template and select the record type you want to pull the data and add the following fields on the template:
This snippet is for Contact Object
❗❗ Note: The will only show logs after the History Tracking has been enabled in Salesforce and does not include deleted records from Salesforce.
What happens to deleted records in Salesforce?
By default Salesforce soft deletes the records, they can still be seen in UI in Recycle Bin and undeleted from there. Records stay in there for 15 days max. Recycle bin’s capacity depends on org’s data storage. Reference.
Your Recycle Bin can contain 25 times your MB storage capacity as records. For example, an org with a storage allocation of 2,000MB (2GB) can have 50,000 records in the Recycle Bin: 25 x 2,000 = 50,000 records.