ApexExecutionOverlayAction

Specifies an Apex code snippet or SOQL query to execute at a specific line of code in an Apex class or trigger. Optionally, generates a heap dump.

Version 

Introduced in API version 25.0.

Supported SOAP API Calls 

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

ActionScript 

  • Type: textarea

  • Required: No

  • Properties: Create, Nillable, Update

  • Description: The Apex code or SOQL query to run when execution reaches the line in the Apex class or trigger at the specified iteration. Results are included in the heap dump file.

ActionScriptType 

  • Type: picklist

  • Required: No

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Description: Indicates whether the ActionScript is written in Apex or SOQL.

If a value for this field is not supplied, or if an empty string is supplied for this value, a default value of None is used.

  • Possible values:

    • None — None

    • Apex — Apex

    • SOQL — SOQL

ExecutableEntityId 

  • Type: reference

  • Required: No

  • Properties: Create, Filter, Group, Sort

  • Description: The ID of the Apex class or trigger being executed.

This field is required if ExecutableEntityName is not provided. If both ExecutableEntityName and ExecutableEntityId are provided, ExecutableEntityId takes precedence.

  • Relationship name: ExecutableEntity
  • Relationship type: polymorphic
  • Refers to: ApexClass, ApexTrigger

ExecutableEntityName 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 43.0

  • Description: The Apex typeRef of the class or trigger being executed. A type lookup is done and, if the typeRef is valid, ExecutableEntityId is set to the ID of the class or trigger.

For a trigger, the typeRef must begin with the SFDC trigger prefix __sfdc_trigger/. For example, __sfdc_trigger/YourTriggerName or __sfdc_trigger/YourNamespace/YourTriggerName.

For a class, use the format YourClass, YourClass$YourInnerClass, or YourNamespace/YourClass$YourInnerClass.

This field is required if ExecutableEntityId is not provided. If both ExecutableEntityName and ExecutableEntityId are provided, ExecutableEntityId takes precedence.

ExpirationDate 

  • Type: datetime

  • Required: No

  • Properties: Create, Filter, Sort, Update

  • Description: The expiration date of the overlay action.

If no value is provided for this field, a default value of 30 minutes from the current time is used.

IsDumpingHeap 

  • Type: boolean

  • Required: No

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: Indicates whether a heap dump is generated (true) or not (false). To execute the ActionScript without generating a heap dump, set this field to false.

If no value for this field is provided, a default value of true is used.

  • Default value: false

Iteration 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: The number of times to execute the specified line execute before the heap dump is generated. This field is required.

Line 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: The line number of the heap dump marker. This field is required.

ScopeId 

  • Type: reference

  • Required: No

  • Properties: Create, Filter, Group, Sort

  • Description: The user who executed the action.

If no value for this field is provided, ScopeId is set to your UserId value.

  • Relationship name: Scope
  • Relationship type: relationship
  • Refers to: User

Usage 

When you are troubleshooting a runtime issue, use ApexExecutionOverlayAction to overlay a diagnostic output on an Apex class or trigger without compromising production code. Use the resulting ApexExecutionOverlayResult to find out more about the state of a variable or of the database or to test your code using specific conditions.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!