Name of documents not shown in accounts and opportunities

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chris8411
    Junior Member
    • Feb 2025
    • 6

    #1

    Name of documents not shown in accounts and opportunities

    Hey folks,

    we use EspoCRM for a while now and we are currently at version 10.0.8. Our sales team is having an issue with documents and I haven't been able to resolve it, so far. Let me explain the situation, before I come to the actual question:

    The entity "Document" represents a file (entity "Attachment") with additional information, such as a document name (as opposed to the original file name). For example, we uploaded a file with the file name "s0m3-cryptic-name-rev123.pdf", linked it to a document with the document name "NDA" and linked the document to the account "ACME". If someone from the sales team opens the "ACME" details, there is a list of documents at the bottom, where the document appears. However, it doesn't say "NDA" anywhere, there's only a paperclip link to the attachment content with the file name ("s0m3-cryptic-name-rev123.pdf" in this example) in the tooltip. The only way I found to see the document names, is to click on the ellipsis → show list → complete form (may be slightly different, I'm retranslating from German), but to our sales team it is actually quite important to quickly see the document name as to instantly grasp the meaning of the document.

    So I went ahead and looked around the entity manager, the involved layouts and settings and couldn't find a way there to include the name column. The same problem appears to be the case in the opportunities.

    Now, my question is: Am I missing something within the settings, layouts, metadata etc. or is this just not possible at the moment. And if so, this would be a feature request rather than a bug report, right? Before I post a bug report or feature request, I wanted to clarify this.

    Thanks in advance
  • ThomasB
    Senior Member
    • Mar 2022
    • 203

    #2
    Have you tried the layout for the entity documents?

    Look for Liste and Liste (klein)
    Last edited by ThomasB; Yesterday, 10:53 AM.

    Comment

    • chris8411
      Junior Member
      • Feb 2025
      • 6

      #3
      Originally posted by ThomasB
      Have you tried the layout for the entity documents?

      Look for Liste and Liste (klein)
      Yes, they do contain the property "Name" and I also tried to rebuild (just in case), but to no avail. I suspect none of the list layouts is used there.

      Comment

      • ThomasB
        Senior Member
        • Mar 2022
        • 203

        #4
        That would be strange. Your name is a custom field? That field should be available there and added to the list.
        I have a custom field type for documents and can flag files with a label as contract, invoice, etc.

        The standard name field is the filename. So if you have a custom field for a pretty name, should be able to add it to the list.
        Last edited by ThomasB; Yesterday, 11:26 AM.

        Comment

        • chris8411
          Junior Member
          • Feb 2025
          • 6

          #5
          Originally posted by ThomasB
          That would be strange. Your name is a custom field? That field should be available there and added to the list.
          I have a custom field type for documents and can flag files with a label as contract, invoice, etc.

          The standard name field is the filename. So if you have a custom field for a pretty name, should be able to add it to the list.
          No it is no custom field, the standard name field is missing. File name and document name are 2 separate things, although they may be identical by default. The file name is part of the file field (which is actually a relationship to an attachment).

          Nonetheless, we will discuss and test the labeling approach as a workaround. Thanks for that

          Comment

          • eymen-elkum
            Active Community Member
            • Nov 2014
            • 509

            #6
            In the standard EspoCRM implementation, a relationship panel uses the related entity’s “List (Small)” layout by default. The standard Document List (Small) layout includes Name, File and Created At, so the Document name should normally appear in the Account and Opportunity panels.

            While logged in to EspoCRM, open one of these URLs directly, replacing the domain and record ID.

            For an Account:

            Code:
            https://YOUR-ESPO-URL/api/v1/Account/ACCOUNT_ID/documents?select=id,name,fileId,fileName,createdAt
            For an Opportunity:

            Code:
            https://YOUR-ESPO-URL/api/v1/Opportunity/OPPORTUNITY_ID/documents?select=id,name,fileId,fileName,createdAt
            Each Document in the returned “list” should contain values similar to:

            Code:
            {
                "id": "...",
                "name": "NDA",
                "fileName": "s0m3-cryptic-name-rev123.pdf"
            }
            If “name” is returned correctly but is not displayed, this points to a client-side relationship-panel or layout issue.

            If “name” is missing even though it was explicitly included in the select parameter, check the Document record, field-level access and any customizations affecting the response.

            Custom code can sometimes cause this behavior. In particular, check custom hooks, API controllers, select/query classes, frontend views, extensions and metadata overrides related to Document, Account or Opportunity. A hook that modifies a fetched Document or a custom select implementation could remove or replace the “name” value.

            I would also check for custom overrides in:

            Code:
            custom/Espo/Custom/Resources/layouts/Document/listSmall.json
            custom/Espo/Custom/Resources/metadata/clientDefs/Account.json
            custom/Espo/Custom/Resources/metadata/clientDefs/Opportunity.json
            custom/Espo/Custom/Resources/metadata/clientDefs/Document.json
            If an installed extension affects these entities, also inspect its corresponding Resources/layouts and Resources/metadata files.

            After that, run Rebuild, clear the EspoCRM cache and perform a hard browser reload. If possible, test in a safe environment with the relevant custom extension or hook temporarily disabled, then re-enable the customizations individually to identify the cause.

            If the issue remains on EspoCRM 10.0.8 without any relevant customization, I would report it through the official EspoCRM support or issue portal as a possible bug rather than a feature request. Include the API result, exported List (Small) layout and a screenshot of the relationship panel.
            Eblasoft | EspoCRM specialists since 2014
            Consulting · Development · Integrations · Premium Extensions
            .

            Comment

            • chris8411
              Junior Member
              • Feb 2025
              • 6

              #7
              Originally posted by eymen-elkum
              If “name” is returned correctly but is not displayed, this points to a client-side relationship-panel or layout issue.
              Meanwhile I used the developer tools of my browser and your point seems to be right. The name is being delivered, but the table cell has a width of zero. We don't have any extensions or custom overrides, though. I'll check your suggestions and request an update. Thanks

              Comment

              • ThomasB
                Senior Member
                • Mar 2022
                • 203

                #8
                Ok, maybe check the name field in the layout manager. Edit it and check the width or if hidden is selected.

                Comment

                • chris8411
                  Junior Member
                  • Feb 2025
                  • 6

                  #9
                  Originally posted by eymen-elkum
                  Code:
                  custom/Espo/Custom/Resources/layouts/Document/listSmall.json
                  Yep, this file was missing a width property for the name field. No Idea how this happened, but adding it manually and rebuilding worked. Thanks a lot.

                  Comment

                  Working...