how to retrieve all the names from the corresponding records?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lj4353
    Senior Member
    • Nov 2023
    • 114

    how to retrieve all the names from the corresponding records?


    I have created two entities, RequestManagement and Requestlist, with a one-to-many relationship between them. I would like to retrieve all the names from the corresponding records in Requestlist and concatenate them into a single string.​
  • Firyo
    Senior Member
    • Jun 2022
    • 134

    #2
    Hi there,

    You can do this
    PHP Code:
    $entity->get('relationNameNames'); 
    
    and it should return you either an array with all the names of all the linked entities or a string containing all the names separated with ","

    base on (https://docs.espocrm.com/administrat...ing/#attribute)
    Click image for larger version

Name:	image.png
Views:	109
Size:	11.1 KB
ID:	102063

    Regards,
    Firyo.​

    Comment

    Working...