locked
Get Lookup Entity new_name from source entity RRS feed

  • Question

  • Hello All,

    I have two custom entities:

    * new_entity1
    * new_entity2

    Entity 1 has the following columns:

    * new_entity1id
    * new_name
    * new_entity2id <-- I want the "new_name" of this from Entity 2 table
    * new_attr2
    * new_attr3

    Entity 2 has the following columns:

    * new_entity2id
    * new_name

    What I want to get is all attributes from Entity 1, but for the "new_entity2id" that exists inside the Entity 1 table, I want to get its "new_name" from Entity 2 using either Fetch XML or Query Expression.

    Anyone know how to do this? Here is the fetch XML I am starting with:

    <fetch mapping="logical">
    	<entity name="new_entity1">
    		<all-attributes />
    		<filter>
    			<condition attribute="new_entity1id" operator="not-null" />
    		</filter>
    	</entity>
    </fetch>
    Thanks,
    Pete
    Wednesday, October 21, 2009 5:23 PM

Answers