Store and Query Log Data with Event Log Objects
Available in: Salesforce Classic (not available in all orgs), and Lightning Experience |
Available in: Enterprise,
Performance, and Unlimited
Editions Requires Salesforce Shield or Salesforce Event Monitoring add-on subscriptions. |
User Permissions Needed | |
To query and view event log object data: |
View Event Log Object Data |
Event Log Object data is available with minimal delay, enabling earlier detection of security and performance incidents. Write advanced SOQL queries to filter or aggregate log data. Event Log Objects are also available to analyze in CRM Analytics using Salesforce Direct, so you can visualize data in a variety of chart types. Because you can access Event Log Objects via Salesforce Platform APIs, you can build custom applications in the Lightning UI for event specific use cases.
Enable Event Log Objects through the Event Manager tab in Setup:- From Setup, in the Quick Find Box, enter Permission, and select Permission Sets.
- Select View Event Log Object Data to access all Event Log Objects. You can alternatively select Event Monitoring User to gain access to all of your Event Monitoring data.
Example
- Security Query: Which users are exporting the most rows via
reports?
SELECT UserIdentifier, SUM(RowCount) FROM ReportEventLog WHERE Origin='ReportExported' AND DAY_ONLY(Timestamp) > LAST_N_DAYS:10 Group By UserIdentifier Order by SUM(RowCount) DESC
- APM Query: What is the number of unexpected apex exceptions
grouped by Exception Category?
SELECT ExceptionCategory, COUNT(Timestamp) FROM ApexUnexpectedExcpEventLog WHERE DAY_ONLY(Timestamp) > LAST_N_DAYS:10 GROUP BY ExceptionCategory ORDER BY COUNT(Timestamp) DESC
- Product Intelligence Query: What are the most loaded lightning
pages?
SELECT COUNT(Timestamp), PageUrl FROM LightningPageViewEventLog WHERE DAY_ONLY(Timestamp) > LAST_N_DAYS:10 GROUP BY PageUrl ORDER BY COUNT(Timestamp) DESC
For information about available Event Log Objects, see these topics in the Object Reference for the Salesforce Platform.
- AnalyticsChangeEventLog
- AnalyticsDownloadEventLog
- AnalyticsInteractEventLog
- AnalyticsPerfEventLog
- ApexCalloutEventLog
- ApexExecutionEventLog
- ApexExtlCalloutEventLog
- ApexRestApiEventLog
- ApexSoapApiEventLog
- ApexTriggerEventLog
- ApexUnexpectedExcpEventLog
- ApiTotalUsageEventLog
- AsyncReportRunEventLog
- AuraRequestEventLog
- BulkApiEventLog
- BulkApi2EventLog
- ConcurApexLimitEventLog
- ContentTransferEventLog
- FlowNavMetricEventLog
- InsufficientAccessEventLog
- KnowledgeArticleEventLog
- LightningLoggerEventLog
- LightningPageViewEventLog
- LoginEventLog
- LoginAsEventLog
- MetadataApiOpEventLog
- PackageInstallEventLog
- ReportEventLog
- RestApiEventLog
- SandboxStatusEventLog
- SiteEventLog
- SearchEventLog
- SearchClickEventLog
- SoapApiEventLog
- TransactionSecurityEventLog
- UriEventLog
- VisualforceRequestEventLog