When initiating document generation, the process may fail with the following error message:
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Reference Object ID: id value of incorrect type: 00TVZ0000026M9Z2AU: [ReferenceObjectId]
This issue occurs when the specified Context/Object ID is associated with an object that is not supported for document attachment within Salesforce. Document generation does not allow attaching files to certain entity types.
The following objects are not supported for use as Context/Object ID in document generation:
This behaviour is functioning as designed. To avoid the error, ensure the Context/Object ID used for document generation belongs to a supported object that permits document attachment.
002890901

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.