Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Entity mapping, query problem

$
0
0

Hello,

I have an Entity named Contact and an Entity named Food.

Contact has a 1:N relationship with Food.

mapping fields in both entities were automatically created when I set up the relationship. They are contactid in Contact and contactid in Food

when I used the contactid(GUID) from Contact to query Food I only got an inactive record, but there're 2 records in total one active one inactive.

Guid contactidFromContact = new Guid(contacts.Contains("contactid") ? contacts["contactid"].ToString() : "");

new ConditionExpression("contactid", ConditionOperator.Equals, contactidFromContact)// query condition

How can I get all the records?

Thank you!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>