---
schema_version: "1"
id: d6cb4405d39b077d50e3954a8a6f2fb457cfda8c0fcaa426f69b04e52ceb8aa1
title: DocumentAttachmentMap
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_documentattachmentmap.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_documentattachmentmap.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7dc9bab71f354a8308d10f21579f5ec96d3a67b6b6713abee1ff9c7c9436f900
description: Maps the relationship between an EmailTemplate and its attachment, which is stored as a Document.
---
# DocumentAttachmentMap

Maps the relationship between an EmailTemplate and its attachment, which is stored as a Document.

## Supported Calls

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

## Special Access Rules

Customer Portal users can’t access this object.

## Fields

| Field | Details |
| --- | --- |
| DocumentId | 
Type

reference

Properties

Create, Filter, Group, Sort, Update

Description

ID of the document that this object tracks.



 |
| DocumentSequence | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

Represents the order that the attachments will be included in the email defined by the EmailTemplate specified by the DocumentId. Label is **Attachment Sequence**. The first attachment is given a value of 0, and each subsequent attachment is given a value incremented by 1.



 |
| ParentId | 

Type

reference

Properties

Create, Filter, Group, Sort, Update

Description

ID of the EmailTemplate parent. The attachment identified by DocumentId is attached to the EmailTemplate specified in this field.



 |

## Usage

Use this object to map the relationship of an EmailTemplate to its attachments, and to specify the order of the attachments.

#### See Also

- [EmailTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailtemplate.htm "Represents a template for an email, mass email, list email, or Sales Engagement email. Supported in first-generation managed packages only.")