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

D365 linq query with Any not working

$
0
0

Hi all,

I have used the below linq query to translate a sql query with a not exists condition.

(from jdgAcc in srv.mn_jdg_accountsSet
where
!srv.mn_jdg_accountsSet.Where(jdgAcc1 => (jdgAcc1.mn_account.Id == jdgAcc.mn_account.Id)
&& (jdgAcc1.mn_contact.Id != jdgAcc.mn_contact.Id)).Any()
select jdgAcc.mn_account.Name)

But this throws an "Invalid 'where' condition. An entity member is invoking an invalid property or method." exception.

Please let me know whats wrong with this query. I am not able to transaform this into a list and get the count because of this error.

Thanks,

Sharmila.


Viewing all articles
Browse latest Browse all 79901

Latest Images

Trending Articles



Latest Images

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