Apex Interactions
Each record in your package usage log that has a custom_entity_type of ApexClass or ApexTrigger describes an interaction with your packaged Apex class or trigger.
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
When log_record_type is ApexExecution, the log record is associated with a user action that resulted in the execution of Apex code from an Apex class or trigger. Only the outermost Apex is captured.
| Standard Data | Supplemental Data |
|---|---|
| num_soql_queries |
When log_record_type is ApexUnexpectedException, the log record is associated with a user action that resulted in an Apex class or trigger throwing an unhandled exception. The stack_trace field provides detail about the Apex unexpected exceptions.
| Standard Data | Supplemental Data |
|---|---|
stack_trace | none |
Let’s look at an example package usage log record and analyze the Apex interaction.
The InsuranceAgentDetailsBatchable packaged component of type ApexClass was interacted with as a result of a user action from subscriber org MyCustomer Inc. Specifically, an execution of a batch Apex job occurred on 2022-11-22 at 6:19 am. The batch Apex job is represented by Quiddity = A.
The key data in this analysis are:
| Question | Field | Value |
|---|---|---|
| What |
|
|
| Who |
|
|
| How |
|
|
| When | timestamp_derived | 2022-11-22T06:19:33.990Z |
See Also