Double Relationship?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pablo
    Senior Member
    • Aug 2015
    • 177

    Double Relationship?

    Hi,

    I have been using EspoCRM for projects and it's GREAT! We have the following situation:

    * We have Clients, Projects and Project Tasks.
    * There's a relationship between Projects and Project Tasks. So when we add a new Project Task from a project page the system shows (prepopulates) the corresponding Project.
    * However, we would also like to relate the Client (of the corresponding project) to the Project Task.
    * We know we can create a relationship between Client and Project Task. However, this field has to be inserted manually and it's not prepopulated.

    Is there any way we can create 2 relationships (Project-Project Task and Client-Project Task) so when we add a new Project Tasks both fields are preopulated?

    Hope it's clear.
    Thanks.
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi

    Example:
    client/modules/crm/src/views/account/detail.js

    You need to specify mapping, eg.
    PHP Code:
    relatedAttributeMap: {
      projectTasks: {
         'clientId': 'clientId',
         'clientName': 'clientName'
      }
    } 
    
    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

    • Pablo
      Senior Member
      • Aug 2015
      • 177

      #3
      Hi,

      Thanks for the fast response. This means the client's name will be preopulated on the Project Task based on the assigned client of that Project?

      Thanks.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        It means attributes will be copied from project model to project task model upon creating Project Task from a Project detail view.
        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...