---
schema_version: "1"
id: d992cb229f0a08bf0a91743fd6bce9278828b623ae9d66f29ec4299832ac952c
title: ApexExecutionOverlayAction
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_apexexecutionoverlayaction.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexexecutionoverlayaction.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3262af8be7a1e520a95c71e7a4075d11e1057ee2880aa630ee418e72c025fb47
description: 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.
---
# 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.

## Supported SOAP Calls

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

## Supported REST HTTP Methods

Query, GET, POST, PATCH, DELETE

## Fields

| Field Name | Details |
| --- | --- |
| ActionScript | 
Type

string

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

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

Indicates whether the ActionScript is written in Apex or SOQL. Valid values are:

- None
- Apex
- 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.





 |
| ExecutableEntityId | 

Type

reference

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.





 |
| ExecutableEntityName | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort

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

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

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.





 |
| Iteration | 

Type

int

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

Properties

Create, Filter, Group, Sort, Update

Description

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



 |
| ScopeId | 

Type

reference

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.





 |

## 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.