Access atribute of child entity
Collapse
X
-
Hi tomas.klicka,
In fact, there is no childId attribute in EspoCRM, it is not created by default after the Parent-to-Children relationship is established. Learn more about attributes here: https://docs.espocrm.com/administrat...ing/#attribute.
You can simply bring your formula to the following form for convenience and better understanding:
Code:$childId = record\findOne('MontazZakazky', 'createdAt', 'desc', 'parentId=', id); $montazniPartie = record\attribute('MontazZakazky', $childId, 'montazniPartie');
Leave a comment:
-
Access atribute of child entity
Hi,
i need to get atribute value from this record and it did not work:
record\attribute('MontazZakazky', childId, 'montazniPartie')
This one works but it seems quite messy.
Don´t you know why the first one does not work?
record\attribute('MontazZakazky', record\findOne('MontazZakazky', 'createdAt', 'desc', 'parentId=', id), 'montazniPartie')
Thanks a lot
Tags: None
Leave a comment: