The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.
Controller class for lwc logBatchPurge
, used to provide metrics of Log__c
, LogEntry__c
, LogEntryTag__c
records to purge and allow user to manually run LogBatchPurger
from the UI.
canUserRunLogBatchPurger()
→ Boolean
Returns true if the current user has delete permission on the Log__c object or
Type
Boolean
Description
true if the current user has delete permission on the Log__c object.
getBatchPurgeJobRecords()
→ List<Schema.AsyncApexJob>
Returns List<Schema.AsyncApexJob>
to display logBatchPurger jobs details in a Datatable.
Type
List<Schema.AsyncApexJob>
Description
The instance of List<Schema.AsyncApexJob>
, containing list of logBatchPurge jobs.
getMetrics(String dateFilterOption)
→ Map<String, Object>
return a Map<String,Object>
contains metrics for number of Log__c
, LogEntry__c
, LogEntryTag__c
records to purge, for the given timeframe TODAY/ THIS_WEEK/ THIS_MONTH. The metrics is grouped by Log__c.LogPurgeAction__c
.
Param | Description |
---|---|
dateFilterOption |
a Date Literal used to filter log records. Possible values are TODAY, THIS_WEEK, THIS_MONTH |
Type
Map<String, Object>
Description
The instance of Map<String,Object>
,contains keys as Log__c
, LogEntry__c
, LogEntryTag__c
and value as metrics for the corresponding object records to purge
getPurgeActionOptions()
→ List<PicklistOption>
Returns all of the PurgeAction options to display the log metrics in UI
Type
List<PicklistOption>
Description
The instance of List<PicklistOption>
, containing all picklist options for purge Action.
runBatchPurge()
→ String
execute the logBatchPurger batch with batch size 2000
Type
String
Description
Returns the ID of the Schema.AsyncApexJob object associated with the LogBatchPurger job as a string
Inner class for returning all custom List<PicklistOption>
in a single Apex method call
label
→ String
value
→ String