Announcement

Collapse
No announcement yet.

LinkMultiple to Contacts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LinkMultiple to Contacts

    Hi, I added the Projects example as explained in the blog to the client which works fine. Now, i’m trying to add a linkMultiple with Contacts by changing the Project.json file.
    "contacts":{
    "type":"linkMultiple"
    }
    "contacts":{
    "type":"hasMany",
    "entity":"Contact",
    "relationName":"EntityProjectsContacts"
    },
    The GUI renders fine and I can select multiple contacts. However when saving the record I get an error message. Looking at the table in the DB, I noticed the table „Entity_Project_Contact is missing a few columns (foreign keys). Any ideas? Do I need to configure additional files in order to make this work? If so, which ones? thx

  • #2
    Do you need one-to-many or many-to-many relationship?
    No need to specify relationName
    If many-to-many you need to define on the other side.

    Comment


    • JoC
      JoC commented
      Editing a comment
      many2many. I have to define it on both sides?

  • #3
    Yes. You have to. Take some existing relationship as a template. application/Espo/Modules/Crm/Resources/metadata/entityDefs/*
    No need to define linkMultiple field if you don't need to display all records in one field. You should just add relationship panel (available in layout manager)


    }

    Comment


    • JoC
      JoC commented
      Editing a comment
      Thx. Works fine. I took me a while to understand what you mean but I got it working. Once you know it, it easy. Can’t wait for more manuals.... I’m used to develop in MS CRM (creating XRM application using MSCRM as development environment, not for it’s CRM functionalities). So far, Espocrm looks better and more flexibel as dev. environment. It’s a good framework to quickly build an XRM application.

  • #4
    We are going to write more guides and docs. Now the main problem is a lack of time/resources

    Comment

    Working...
    X