locked
CRM 2015 Online, FetchXML View to Include Attributes from Nested Link-Entity RRS feed

  • Question

  • Hi,

    I am trying to create a saved view out of an N:N relationship between two entities.  So, Entity 1 links to the intersect entity, then links to Entity 2.  I want LayoutXml to include Attributes from other 2 nested Link-Entity(s).

    However, I cannot achieve it. I get "Server was unable to process request." error.   It seems that LayoutXml limits to show only attributes from the primary entity, not even the first link-entity, not the second link-entity?

    I have looked http://www.tagwith.com/question_6247194_fetchxml-view-to-include-attributes-from-nested-link-entity.  Not quite understand what multiobjectidfield="1" means.  Does anyone have an example?  Thanks.

    Tuesday, October 27, 2015 1:33 AM

Answers

  • The LayoutXml can only show attributes from entities that are connected as a parent in all relationships to the entity that the Fetch is based on. This is because otherwise you may have more that one record per row, which cannot be displayed.

    So, the only way this can work is if the Fetch is based on the intersect entity. The fetch should work whether the intersect entity is manually created, or if it is part of a native N:N relationship; however I don't think the CRM UI lets you create view on intersect entities that are part of a native N:N relationship

    multiobjectidfield is not relevant here - it's used if the Fetch entity uses one of the build-it polymorphic types (e.g. Customer or ActivityPointer)


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by chicago bq Tuesday, October 27, 2015 7:16 PM
    Tuesday, October 27, 2015 2:34 PM
    Moderator

All replies

  • The LayoutXml can only show attributes from entities that are connected as a parent in all relationships to the entity that the Fetch is based on. This is because otherwise you may have more that one record per row, which cannot be displayed.

    So, the only way this can work is if the Fetch is based on the intersect entity. The fetch should work whether the intersect entity is manually created, or if it is part of a native N:N relationship; however I don't think the CRM UI lets you create view on intersect entities that are part of a native N:N relationship

    multiobjectidfield is not relevant here - it's used if the Fetch entity uses one of the build-it polymorphic types (e.g. Customer or ActivityPointer)


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by chicago bq Tuesday, October 27, 2015 7:16 PM
    Tuesday, October 27, 2015 2:34 PM
    Moderator
  • Hi, David-

    Thanks.  Even though your explanation does not help me to build the view in CRM UI, it makes a lot of sense. I created a CRM report in this case, as the alternative to the saved view.

    Tuesday, October 27, 2015 7:16 PM