Loading
Salesforce에서 이메일을 보내기 위해서는 도메인 인증이 필요합니다.더 많이 읽기

Document Generation Error: "List has no rows for assignment to SObject"

게시 일자: Apr 6, 2026
상세 설명

This error typically occurs when the running user does not have the required access to the document template or the related file stored in the Document Template Library.

솔루션
  • Multiple factors can contribute to this error. To resolve the issue, review the following:

    1. Ensure that the affected user has the Salesforce CRM Content User permission enabled on their User Detail page in Setup.
    2. Ensure that the affected user has access to the appropriate Document Template Library:
      • For OmniStudio orgs: DocGenDocumentTemplateLibrary
      • For CME/Insurance (Vlocity) orgs: VlocityDocumentTemplateLibrary
        Access can be granted by adding the user as a library member directly, or by granting access to a group and adding the user to that group.
    3. If there are custom fields on the ContentVersion object marked as Required, this error can occur. Managed package processes do not populate custom fields. Ensure that such fields are marked as required only at the page layout level, not at the field definition level.
    4. If the affected user is a Customer Community User, additional configuration is required:
    5. For DOCX templates, verify access to the underlying file associated with the document template:

      • Each document template stores a reference to a file (Content Version) through a field (for example, TemplateContentVersionId__c or a related junction object such as DocumentTemplateContentDoc). This referenced file must be accessible to the user generating the document.

      To identify the associated file, use the following queries:

      • OmniStudio orgs: SELECT Id, LatestContentVersionId FROM DocumentTemplateContentDoc WHERE DocumentTemplateId = '<DocumentTemplateId>'

      • Vlocity (CME/Insurance) orgs: SELECT Id, vlocity_cmt__TemplateContentVersionId__c FROM vlocity_cmt__DocumentTemplate__c WHERE Id = '<DocumentTemplateId>'

    6. Ensure proper file sharing with the Document Template Library:

      • The file referenced by the document template must be shared with the corresponding Document Template Library.
      • When the library is configured correctly, files are automatically shared with its members.
      • However, sharing issues can occur in the following scenarios:
        • The document template was created before the library was created.
        • The template was created by a user who was not a member of the library at the time of creation.

      In such cases, the file may not be properly shared with the library. To resolve this:

      • Re-upload the file to the document template, ensuring it is done by a user who has access to the library, or
      • Manually ensure the file is shared with the library.
Knowledge 기사 번호

000396806

 
로드 중
Salesforce Help | Article