---
schema_version: "1"
id: 77de579877a6773284058dad11ca6c5f71a1457b45fb84a949f99aaa94450c8c
title: InvoiceDocument
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_invoicedocument.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_invoicedocument.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6dec5cb9a3c8a93a28cecf7e1a4c3b621650378452a96db26636562a4d23dd6b
description: Tracks and displays the status of documents generated for invoices. Invoice documents are available in the related lists of invoice entity records. This object is available in API version 61.0 and later.
---
# InvoiceDocument

Tracks and displays the status of documents generated for invoices. Invoice documents are available in the related lists of invoice entity records. This object is available in API version 61.0 and later.

## Supported Calls

describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search()

## Special Access Rules

This object is available with Billing (Revenue Cloud).

For information about this object that's available with Billing (Revenue Cloud), including its special access rules, see the [Revenue Cloud Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/sforce_api_objects_invoicedocument.htm "HTML (New Window)").

## Fields

| Field | Details |
| --- | --- |
| ContentDocumentId | 
Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The ID of the generated PDF document.

This field is a relationship field.

Relationship Name

ContentDocument

Refers To

ContentDocument



 |
| DateGenerated | 

Type

date

Properties

Filter, Group, Nillable, Sort

Description

The date on which the PDF is generated.



 |
| DocumentGenerationProcessId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The ID of the entity that contains the information used to create the PDF invoice.

This field is a relationship field.

Relationship Name

DocumentGenerationProcess

Refers To

DocumentGenerationProcess



 |
| DocumentNumber | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

The ID of the generated document.



 |
| ErrorMessage | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Errors that occur during PDF generation.



 |
| InvoiceId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID of the invoice entity to which the invoice document is attached.

This field is a relationship field.

Relationship Name

Invoice

Relationship Type

Master-detail

Refers To

Invoice (the master object)



 |
| Status | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

The status of the PDF generation process.

Possible values are:

- Blocked
- Cancelled
- Failure
- Pending
- Success





 |