Hello,
I want to be able to track people as they change jobs from one Account to another. In this case I don't want to remove the record of their previous role, just set it as inactive.
I've started work on the feature: https://github.com/alasdaircr/espocr...ae8ca12938a20e
It's very simple, just adding another column to accountContact table. if !active show a strikethrough on the contact's detail page.
I now wish to have only contacts with an 'active' role to show up in searches by default. This means adding a where clause to all searches for accountContact.acccount_id = <accid>.
I'm trying to see if there's a nice way of doing this or it'll just need to be a hack.
Is this something that Espo might want to take on in the future? If so I could tidy up the patch with your suggestions.
An issue I'm having is that the accountRole and accountId that is returned for contacts that haveMany accounts is the primary one, not the actual relevant accountRole.
e.g. John is CEO at Light Corp (primary account), and Janitor at Dark Corp. when I lists contacts of Dark Corp I see title: CEO for John, NOT Janitor.
Do you know how this could be fixed?
I want to be able to track people as they change jobs from one Account to another. In this case I don't want to remove the record of their previous role, just set it as inactive.
I've started work on the feature: https://github.com/alasdaircr/espocr...ae8ca12938a20e
It's very simple, just adding another column to accountContact table. if !active show a strikethrough on the contact's detail page.
I now wish to have only contacts with an 'active' role to show up in searches by default. This means adding a where clause to all searches for accountContact.acccount_id = <accid>.
I'm trying to see if there's a nice way of doing this or it'll just need to be a hack.
Is this something that Espo might want to take on in the future? If so I could tidy up the patch with your suggestions.
An issue I'm having is that the accountRole and accountId that is returned for contacts that haveMany accounts is the primary one, not the actual relevant accountRole.
e.g. John is CEO at Light Corp (primary account), and Janitor at Dark Corp. when I lists contacts of Dark Corp I see title: CEO for John, NOT Janitor.
Do you know how this could be fixed?
Comment