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

Fetch null field attribute in CRM 365

$
0
0

Hi,

I have list account entity. I want to order them based on custom field defined for account entity which is defined as optional that means it can have null values. I am using late bound entity for some purpose. If I try to sort them based on custom field it give "key not found" exception. 
Since that field may have some value in other account entity, I want to sort them based on ascending order.
Something similar below

var result = accountEntitites.OrderBy(p => p.customField == null)
                 .ThenBy(p => p.customField);




Viewing all articles
Browse latest Browse all 79901

Trending Articles



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