when i create a relation many to one with Leads, leadname is null if Name in the selected Lead is empty (it does not use the ->getName method, i.e. using Name if available, or AccountName, or Telephone, etc.). leadId is shown instead.
See attached pictures, where api response for the related entity was:
{"id":"ce41c0e8593f462f9","name":"UNITA' SECONDARIA - UNITA SECONDARIA","deleted":false,"description":null,"cr eatedAt":"2024-03-26 23:16:56","modifiedAt":"2024-04-09 16:02:05","addressStreet":"Via xxx, 6","addressCity":"xxxx","addressState":"xxx","addr essCountry":"Italy","addressPostalCode":"30029","c reatedById":"system","createdByName":"System","mod ifiedById":"65f2e6c16564600c6","modifiedByName":"A dmin","assignedUserId":null,"assignedUserName":nul l,"teamsIds":[],"teamsNames":{},"accountId":null,"accountName":nu ll,"leadId":"761f2ccd7d384efea","leadName":null}
-----------------------------------------------------------------
See attached pictures, where api response for the related entity was:
{"id":"ce41c0e8593f462f9","name":"UNITA' SECONDARIA - UNITA SECONDARIA","deleted":false,"description":null,"cr eatedAt":"2024-03-26 23:16:56","modifiedAt":"2024-04-09 16:02:05","addressStreet":"Via xxx, 6","addressCity":"xxxx","addressState":"xxx","addr essCountry":"Italy","addressPostalCode":"30029","c reatedById":"system","createdByName":"System","mod ifiedById":"65f2e6c16564600c6","modifiedByName":"A dmin","assignedUserId":null,"assignedUserName":nul l,"teamsIds":[],"teamsNames":{},"accountId":null,"accountName":nu ll,"leadId":"761f2ccd7d384efea","leadName":null}
-----------------------------------------------------------------
- What errors are logged
No error where logged - Explicit unambiguous steps for reproducing the issue.
- create a new entity
- create a many to one relation with Lead
- add lead field to list and detail view of the new entity
- create a lead with empy name field (just the account name)
- create a new entity and select the a.m. lead
(the created entity show the lead field with the correct value, i.e. the account name) - display the new entity list: the lead field show the id of the lead (instead of the account name)
- display the details of the entity you just created: the lead field show the id of the lead (instead of the account name)
- EspoCRM version number.
8.2.2 - PHP version number.
8.2 - Database platform name (MySQL, MariaDB, PostgreSQL) and version number.
PostgreSQL 16.1
Comment