By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
A hyper-practical, zero-fluff guide for real projects and certifications
You’re the Salesforce Admin for a mid-sized company. One day, your VP of Sales storms into your desk: "Someone changed the Close Date on the Acme deal from Q3 to Q4—now our forecast is wrong, and the board is furious. Who did this? When? And what else did they touch?"
Without Audit Trails and Field History Tracking, you’re flying blind. You’d have to: - Manually dig through emails or Slack messages (if they even exist). - Hope the user remembers what they changed (spoiler: they won’t). - Risk compliance violations (e.g., GDPR, SOX) because you can’t prove who accessed sensitive data.
This guide gives you three superpowers:1. Audit Trail: A timestamped log of who changed what in Setup (e.g., profiles, sharing rules, custom fields).2. Field History Tracking: A granular record of how a specific field’s value changed over time (e.g., Opportunity Amount, Case Status).3. Setup Audit Trail: A 180-day rolling log of administrative changes (e.g., who deleted a user, modified a workflow).
Why this matters in production: - Compliance: Prove to auditors that data changes were authorized (e.g., "Yes, Jane updated the Contract Expiration Date on 5/15/2024 at 2:30 PM"). - Troubleshooting: Debug issues like "Why did this record disappear?" or "Who turned off validation rules?" - Security: Detect suspicious activity (e.g., a user suddenly exporting all Leads). - User Accountability: Stop finger-pointing ("I didn’t change that!"-"Actually, your username shows you did at 3:17 AM").
Real-world scenario: You inherit a Salesforce org with 50+ admins. A critical workflow rule breaks, and no one admits to touching it. Setup Audit Trail lets you pinpoint the exact change (and the culprit) in 2 minutes.
Prerequisites: - You have System Administrator permissions. - You’re using Salesforce Classic or Lightning Experience (steps are similar).
Object Manager
Amount: $10,000-$12,000 Changed by: [Your Name] Date: [Today’s Date]
To export history for reporting:1. Go to Reports-New Report.2. Select Opportunity History report type.3. Add filters (e.g., Date = Last 30 Days).4. Run the report-Export as CSV.
Date = Last 30 Days
Prerequisites: - You have View Setup and Configuration permissions.
Audit Trail
Date,User,Action,Section,Delegate User,Display 2024-05-15 14:30:00,[email protected],Changed,Profiles,,Changed "Standard User" profile 2024-05-15 14:25:00,[email protected],Deleted,Custom Fields,,Deleted "Opportunity.Custom_Field__c"
Use the Salesforce CLI to fetch the audit trail programmatically:
# Authenticate (replace with your credentials) sfdx force:auth:web:login -a MyOrg # Query Setup Audit Trail (last 30 days) sfdx force:data:soql:query -q "SELECT Id, Action, CreatedDate, CreatedBy.Name, Display FROM SetupAuditTrail WHERE CreatedDate = LAST_N_DAYS:30" -u MyOrg --csv > setup_audit_trail.csv
Why this matters: Automate exports for compliance audits or incident response.
Hist_
Hist_Contract_Signed_Date__c
Salesforce Administrator Exam Tips
Trap: Field History Tracking (tracks record changes, not Setup).
"How many fields can you track on a standard object?"
Trap: 60 (this is for custom objects).
"A user says they didn’t change a record, but the history shows their name. Why?"
Trap: Assuming all changes are manual (system processes can log the user who triggered them).
"How long is Setup Audit Trail retained?"
Trap: 1 year (this is for Field History in some editions).
"Which of these fields can’t be tracked with Field History?"
"You need to prove to an auditor that no one changed the Discount % field on Opportunities in the last 6 months. What do you do?" - Answer: 1. Check if Field History Tracking is enabled for the Discount % field. 2. Run an Opportunity History report for the last 6 months. 3. Export the report as a CSV for the auditor. 4. If tracking wasn’t enabled, explain that retroactive tracking isn’t possible (and enable it now for future audits). - Trap: Suggesting Setup Audit Trail (it won’t show record changes).
"A user claims they didn’t change the Stage of an Opportunity from 'Prospecting' to 'Closed Won,' but the history shows their name. How can you prove whether they did it manually or if a workflow updated it?"
If the "Changed By" field shows the user’s name, they manually updated it.
Check Workflow/Flow Logs:
If a workflow triggered the change, the debug log will show: WORKFLOW_RULE: [Opportunity: Acme Deal] | Rule Name: Auto-Close Won Deals
WORKFLOW_RULE: [Opportunity: Acme Deal] | Rule Name: Auto-Close Won Deals
Conclusion:
Why this works: Field History logs the user who triggered the change, even if a workflow did the actual update.
bash sfdx force:data:soql:query -q "SELECT Id, Action, CreatedDate FROM SetupAuditTrail WHERE CreatedDate = LAST_N_DAYS:30" -u MyOrg --csv > audit_trail.csv
Final Pro Tip: "Audit logs are like a security camera—useless if you don’t check the footage. Set up a monthly reminder to review Field History and Setup Audit Trail for suspicious activity."
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.