Eric Rodriguez - 5 years ago
After two support cases and several discussions with our CSM, the conclusion is that the object Miguel mentions is not available. I showed them Miguel's screenshot, but they still say it's not available. We have gone ahead with the package built by Daniel Peter here: https://blog.safaribooksonline.com/2013/11/04/auditforce-native-surfacing-of-the-salesforce-setup-audit-trail/
@Miguel - if you see this, please reach out to me. I'm just in shock that you have this object available in your org, and SFDC says it does not exist all the way to the program manager. I saw your post requesting this from 2 years ago, the screenshot, the idea you created to add a field to the SetupAuditTrail object, so I know it exists. There just has to be a logical reason why SFDC is saying it's not available.
@Patrick Sorry didn't saw your comment earlier. We didn't do any special request to Support nor took any action on our Org to have it available, it just appeared with API27 and we put it to work. Maybe it is related to our Org type (Ultimate) or permissions needed (we access with System Administrator, all rights flagged).
From APEX Data Loader v29 (But available since v27):
You have to select "Show all Salesforce Objects" or it will not be in the list.
The Object stores the contents of Setup - Security Controls - View Setup Audit Trail, though in an slightly different format. One particularly nasty difference is the Object does not hold "Delegate User" information for an specific action, so to investigate if an specific event happened through impersonation you have to download the Excel and find the entry there.
But again, maybe I'm missing some point here and this is not the information you're looking for?
Patrick Watkins - 5 years ago
@Miguel, are you sure you aren't looking at "Setup Entity Access"? That's a completely different object. When I look in workbench or through data loader (yes, also checking the box to "show all objects", there is no object called SetupAuditTrail, nor is it documented anywhere in the API guides.
Christopher Wagner - 5 years ago
That would be great, Miguel! Unfortunately I do not see the SetupAuditTrail object among those to be selected from the DataLoader, and it is not accessible via DBAmp either. Did you have to do something special (request a feature via case to Salesforce Support?) to get this access?
I'm a bit surprised this is not yet closed, since API 27 I'm using the following statement to automate extractions, analysis for external integrations and Security Alerts:
Select <Fields> FROM SetupAuditTrail WHERE ...
I'm using Data Loader to drive the queries, but surely works with other APIs/Tools as long as the user has proper rights. Surely this covers the requirement, or am I missing some point?
Christopher Wagner - 5 years ago
This is one of a couple possibilities for solving the all-or-nothing type of audit trail currently in use. There is almost no use in seeing just the latest twenty setup changes that are visible in the View Setup Audit Trail page, and downloading six months worth of changes is excessive.
I would like to see BOTH, a way to create customized list views AND an API object which could be copied by DBAmp into MS SQL Server for query. In the list view, I could filter by date, user, or section. In the SQL Server, I would reduce Transact-SQL query results with a WHERE clause on those same columns/fields.