Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6376633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:46:12+00:00 2026-05-25T01:46:12+00:00

I am trying to pull down the NULLS of the contacts and I am

  • 0

I am trying to pull down the NULLS of the contacts and I am using DefaultIfEmpty to do it. But I am getting this error.

“The method ‘GroupJoin’ cannot follow the method ‘Join’ or is not supported. Try writing the query in terms of supported methods or call the ‘AsEnumerable’ or ‘ToList’ method before calling unsupported methods.”

I am using the LINQ-to-CRM provider and querying from the CRM 2011 Web Service.

This is the code I am using:

var linqQuery = (from r in orgServiceContext.CreateQuery("opportunity")
         join a in orgServiceContext.CreateQuery("account") on ((EntityReference)r["accountid"]).Id equals a["accountid"]
         join c in orgServiceContext.CreateQuery("contact") on ((EntityReference)r["new_contact"]).Id equals c["contactid"]
         where ((EntityReference)r["new_channelpartner"]).Id.Equals(new Guid("c55c2e09-a3be-e011-8b2e-00505691002b"))
         select new
         {
           OpportunityId = !r.Contains("opportunityid") ? string.Empty : r["opportunityid"],
           CustomerId = !r.Contains("customerid") ? string.Empty : ((EntityReference)r["customerid"]).Name,
           Priority = !r.Contains("opportunityratingcode") ? string.Empty : r.FormattedValues["opportunityratingcode"],
           ContactName = !r.Contains("new_contact") ? string.Empty : ((EntityReference)r["new_contact"]).Name,
           Source = !r.Contains("new_source") ? string.Empty : r["new_source"],
           CreatedOn = !r.Contains("createdon") ? string.Empty : r["createdon"],
           State = !a.Contains("address1_stateorprovince") ? string.Empty : a["address1_stateorprovince"],
           Zip = !a.Contains("address1_postalcode") ? string.Empty : a["address1_postalcode"],
           Eval = !r.Contains("new_colderevaluation") ? string.Empty : r.FormattedValues["new_colderevaluation"],
           DistributorName = !r.Contains("new_channelpartner") ? string.Empty : ((EntityReference)r["new_channelpartner"]).Name,
           ContactStreetAddress = !c.Contains("address1_line1") ? string.Empty : c["address1_line1"]
         });

How would I go about getting rid of this error? Any help would be awesome.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:46:13+00:00Added an answer on May 25, 2026 at 1:46 am

    Since your LINQ query must ultimately translate to a valid QueryExpression, you can’t do some of the fancier projection stuff because the OrganizationDataContext isn’t smart enough to run the simple QueryExpression and then apply your fun “fieldname = !c.Contains("fieldname") ? string.Empty : c["fieldname"]” in memory. You have to do that yourself.

    So, in your first query, just do:

    var linqQuery = (from r in orgServiceContext.CreateQuery("opportunity")     
        // snip
        select new
        {
          fieldname = c["fieldname"],
          //etc...
        });
    

    Then do something like:

    var linqQuery2 = from r in linqQuery.ToList()
                     select new
                     {
                       fieldname = r["fieldname"] == null ? string.Empty : r["fieldname"],
                       //(etc)...
                     };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to pull in information from Asana API via JQuery.ajax() method. But
I am trying to pull down xml content from the server using jQuery.post() in
I'm trying to pull some data out of logs on remote machines using awk,
I am trying to pull an LDAP jpegPhoto attribute from an openLDAP server using
I'm trying to pull a project from git, in particular, this one: https://github.com/pocmo/Yaaic .
I've installed subversion on my ubuntu machine and I am trying to pull down
I think this question is like clay pidgeon shooting.. pull... bang! .. shot down..
I'm working on a bigger problem, but have narrowed it down to this, in
I'm trying to crawl FTP and pull down all the files recursively. Up until
I am trying to create a multi level drop down menu hopefully using PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.