Surfacing data from related entities using custom template
-
Hey there,
probably an easy question, but I just cannot wrap my head around how to display data of a record from a field in a related entity.
Using a view the data is displayed, however, I would like to customize the way it gets displayed, hence my question.
D365 Info:
The view displays records of the entity “ud_tutorial”. There is a 1:1 connection to the entity “udc_seminartype” – and for what its worth, the lookup field on the entity “ud_tutorial” is “udc_seminartypeid”. The value that I am trying to get is “udc_title” (from said entity “udc_seminartype”).The view:
[msdyncrm_twig] {% view entity="ud_tutorial" name="My View" count="15" cache="PT60M" %} {% endview %} [/msdyncrm_twig]
{% for recordId, record in entityview.rows %} <tr> <td>{{ record["udc_seminartypeid.udc_title".value ]}}</td> </tr> {% endfor %}
What would be the correct syntax in this case? I assumed that it would work similarly to Power Automate, where I would write down the path from the original entity through the lookup field to the field that I need.
Maybe you could point me in the right direction and/or where to look in the Twig documentation?
Kind regards
Kim
- The topic ‘Surfacing data from related entities using custom template’ is closed to new replies.