---
schema_version: "1"
id: 7d64a8a042a1c6fe315d90803b59421fc55296e36d97f73e4f98941534118834
title: ApexEmailNotification
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_apexemailnotification.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apexemailnotification.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 17a6baf6f481476679e4a5057faa97776f354a43cb763ad7335ff720a10f3e7c
description: Stores a Salesforce user ID or external email address to be notified when unhandled Apex exceptions occur. This object is available in API version 35.0 and later.
---
# ApexEmailNotification

Stores a Salesforce user ID or external email address to be notified when unhandled Apex exceptions occur. This object is available in API version 35.0 and later.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Each ApexEmailNotification contains either an email or a user ID, but not both.

## Supported Calls

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

## Fields

| Field | Details |
| --- | --- |
| Email | 
Type

string

Properties

Create, Filter, Group, idLookup, Nillable, Sort, Update

Description

The external email address to which the notification is sent. Mutually exclusive with the UserId field.



 |
| UserId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the user to which the notification is sent. Mutually exclusive with the Email field.

This is a relationship field.

Relationship Name

User

Relationship Type

Lookup

Refers To

User



 |

## Usage

To notify users of your org at the email addresses they have on record, use UserId. To notify external users or alternate email addresses, use Email.