Forums

Forums / Developing Portals / Custom Layout with CRM List View

Custom Layout with CRM List View

Thread is closed for posting
2 posts, 1 answered
  1. Missing user
    Missing user avatar
    16 Jan 2016
    Link to this post
    How can I index into a field on a linked entity in the custom layout? For example in the below code, how to I get the aa_childentityfield onto the List? I've tried using the alias, the logical name and parent.child (both alias and logical). 

    Fetch xml:
    <fetch version="1.0" mapping="logical" output-format="xml-platform">
      <entity name="aa_parententity">
        <attribute name="aa_parententityid" />
        <filter type="and">
          <condition attribute="aa_relationshipidfield" operator="eq" value="@CID@" />
        </filter>
        <link-entity name="aa_childentity" alias="aa_childentity" to="aa_parententity" from="aa_parententityid">
          <attribute name="aa_childid" />
          <attribute name="aa_childfield" alias="aa_childfield" />
        </link-entity>
      </entity>
    </fetch>

    ASP Label
    <td>
    <asp:Label ID="Label3" runat="server" Text='<%#Eval("[what goes here??]") %>'></asp:Label>
     </td>
  2. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    18 Jan 2016 in reply to Missing user
    Link to this post

    Hello Andrew,

    All Telerik documentation for the list view can be found here:
    http://demos.telerik.com/aspnet-ajax/listview/examples/overview/defaultcs.aspx

    In order to retrieve the values of linked entity fields in a CRM List View template you must evaluate the fields differently.

    To evaluate a field on the primary entity (non-linked):
     

     <%#Eval("field_name") %>
    

     To evaluate a field on a linked entity: 

     <%#DataBinder.GetPropertyValue(Container.DataItem, "alias.field_name") %>
    

    Last modified on 18 Jan 2016 13:01 by Clinton Bale
2 posts, 1 answered