No announcement yet.

Many-to-Many relationships with metadata

  • Filter
  • Time
  • Show
Clear All
new posts

  • Many-to-Many relationships with metadata

    Hi everyone,

    I'm hoping to create a many-to-many relationship between an entity and itself, with metadata added.


    I have an entity: Organization.
    An Organization can support another organization, or receive support from another organization.

    When I create a many-to-many relationship on the entity Organization, with the same entity Organization, and call the left label: 'Provides support to' and the right label: 'Receives support from', then this works perfectly.

    But now I would like to add two dates to this relationship: 1. when the support relationship started, and when it ended.
    This is not possible in the many-to-many relationship.

    In each organization I would like to have a two bottom panel showing:

    Organization name - from date - to date

    Receives support from:
    Organization name - from date - to date

    Any ideas how to achieve this?

  • #2
    Hi Maarten,

    I'd consider creating a separate entity with two many-to-one relationships.

    While there's the ability to have relationship middle table fields, there's no support for date/time fields in the front-end. Hence, would require coding.


    • rabii
      rabii commented
      Editing a comment
      any chance in the future to have such ability (allow middle table to have more fields)? seems complex but would really enhance the user experience.

    • espcrm
      espcrm commented
      Editing a comment
      Off-topic: But I wonder if this is the reason why I got this issue with my Event type entity:

      Maybe we can use this thread to discuss v7.4 in general. And if anyone can help solve my issue as well! Recently ran into a bug in v7.4, my PDF template have not change. Tried with both engine so it is an issue with both PDF engine. The issue here is that, I don't even use the field in my PDF template but look like it still

      Was working fine in v7.3 or earlier though. Only something change in v7.4 or possible bad upgrade that cause it.

  • #3
    If you don't want to code, I believe that eymen-elkum extension will allow you to do that


    • #4
      This extension would help you do the trick


      • #5
        Eblasoft eymen-elkum
        This extension isn't working with Espo 7.4.3 (at least for me). Every time I try to use a link multiple with Form enabled and add a new row to the inline list and attempt to save I receive the following error.

        Can't relate with non-existing record.

        I have tested it with all version of the extension 3.34.0, 3.33.2, 3.33.1, 3.32.0. All fail with the same error. So maybe something in Espo 7.4.* isn't compatible now? Please advise. Any help would be appreciated as I use this extension throughout my application and really don't want to have to downgrade Espo.
        Last edited by czcpf; 04-16-2023, 01:47 AM.


        • espcrm
          espcrm commented
          Editing a comment
          I can only suggest testing it on the demo if they upgrade to v7.4 or send a Support request to them.

        • czcpf
          czcpf commented
          Editing a comment
          I’ve done that and the @eymen-elkem was able to update the extension to support 7.3.* and 7.4.*. Great support for those guys!