LinkMultiple to Contacts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoC
    Junior Member
    • Aug 2014
    • 3

    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
  • yuri
    Member
    • Mar 2014
    • 8846

    #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.
    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


    • JoC
      JoC commented
      Editing a comment
      many2many. I have to define it on both sides?
  • yuri
    Member
    • Mar 2014
    • 8846

    #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)


    }
    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


    • 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.
  • yuri
    Member
    • Mar 2014
    • 8846

    #4
    We are going to write more guides and docs. Now the main problem is a lack of time/resources
    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...