I have created a new entity called Referrers. I was able to link that entity with a One to Many relationship to Accounts, Contacts, and Opportunities. Those relationships are working as intended.
My problem occurs when trying to create a link from Referrers to Leads with a One to Many relationship. When I try to create the link, I get the error message:
When I view the relationship screen for Referrers, I only see the relationship created for Accounts, Contacts, and Opportunities. There is no listing for Leads.
If I try to create the relationship link in the other direction by starting with Leads and creating a Many to One relationship link with Referrers, I get the same error message:
When I view the relationship screen for Leads, I see only the default links:
The log file has this entry when I try to create the relationship link:
It is possible that earlier in the process of trying to figure out how to add this Referrer's entity that I inadvertently added something somewhere. But I can't find any evidence of a pre-existing link from Leads to Referrers. Where should I look? I've been through the database in PHP MyAdmin and I do see that there is a referrer_id column (the last column added) for the lead table. If I try to delete that, I get errors on the home screen of EspoCRM. After removing that column I had to use the rebuild feature to get the errors to go away. So currently that column is back in place.
Any suggestions of where to look or what files to edit to fix this issue?
My problem occurs when trying to create a link from Referrers to Leads with a One to Many relationship. When I try to create the link, I get the error message:
Name conflict: link or field with the same name already exists
Name conflict: link or field with the same name already exists
Lead | leads | Many-to-Many | calls | Call | Edit | |
Lead | leads | Many-to-One | campaign | Campaign | Edit | |
Lead | parent | Parent-to-Children | campaignLogRecords | CampaignLogRecord | Edit | |
Lead | lead | One-to-Many | cases | Case | Edit | |
Lead | leads | Many-to-Many | documents | Document | Edit | |
Lead | parent | Parent-to-Children | emails | Edit | ||
Lead | leads | Many-to-Many | meetings | Meeting | Edit | |
Lead | leads | Many-to-Many | targetLists | Target List | Edit | |
Lead | parent | Parent-to-Children | tasks | Task | Edit |
[2016-12-08 15:05:11] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => EntityManager [action] => createLink ) , InputData: {"entity":"Lead","entityForeign":"Referrer","link" :"referrer","linkForeign":"leads","label":"Referre r","labelForeign":"Leads","linkType":"manyToOne"," relationName":"leadReferrer","linkMultipleField":f alse,"linkMultipleFieldForeign":false} - Link [Lead::referrer] already exists. [] []
[2016-12-08 15:05:11] Espo.ERROR: Display Error: Link [Lead::referrer] already exists., Code: 409 URL: /api/v1/EntityManager/action/createLink [] []
[2016-12-08 15:05:11] Espo.ERROR: Display Error: Link [Lead::referrer] already exists., Code: 409 URL: /api/v1/EntityManager/action/createLink [] []
Any suggestions of where to look or what files to edit to fix this issue?
Comment