Breadcrumb issue in entity detail view

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IshitaRana
    Junior Member
    • Apr 2025
    • 4

    #1

    Breadcrumb issue in entity detail view

    I've encountered an issue with the breadcrumb display when creating and editing cases in our application.

    Issue Description:
    • When a new case is created, the breadcrumb initially displays the backend ID of the case, which is the primary key in the database, instead of the expected auto-increment case number.
    • However, if I edit and save the case, the breadcrumb correctly updates to show the auto-increment case number, as intended.

    Expected Behaviour:
    The breadcrumb should display the case number from the start, without requiring an additional edit and save action.

    Steps to Reproduce:
    1. Create a new case.
    2. Observe the breadcrumb, which displays the backend ID.
    3. Edit and save the case.
    4. Notice that the breadcrumb now correctly shows the case number.
    I'm looking for guidance on how to ensure the correct case number is displayed in the breadcrumb right from the creation step, without the need for this additional edit.
    Attached Files
  • victor
    Active Community Member
    • Aug 2022
    • 908

    #2
    How are you creating cases? It looks like you don't have the name field marked Required in your settings:

    Click image for larger version

Name:	image.png
Views:	0
Size:	24.4 KB
ID:	117869
    In addition, you probably have a formula or workflow that assigns a Сase number to the name field instead of a regular text value.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8952

      #3
      It seems that the name field was removed from the layout and set as not-required.

      As the number field is set by the database upon creating, using before-save script formula or a before-save hook to populate the name field with the number won't work, as the number is not yet available.


      Possible solution (for v9.1 or greater):

      Create a file: custom/Espo/Custom/Resources/metadata/clientDefs/Case.json

      Code:
      {
          "nameAttribute": "number"
      }
      Then, clear cache.

      But I'm not sure if it will work out.

      Another solution is to use an after-save hook to populate the name field after case creation. Or a workflow rule.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...