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 161027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:08:24+00:00 2026-05-11T11:08:24+00:00

I have a query that I need to execute against CRM. It is the

  • 0

I have a query that I need to execute against CRM. It is the equivalent of the following in SQL:

SELECT A.*, B.* FROM Table1 A INNER JOIN Table2 B ON A.ID = B.ID 

I created a query and added a linkentity as follows:

link.JoinOperator = JoinOperator.Inner; link.LinkFromEntityName = EntityName.new_Table1.ToString(); link.LinkFromAttributeName = 'new_Table1ID'; link.LinkToEntityName = EntityName.new_Table2.ToString(); link.LinkToAttributeName = 'new_Table2ID'; query.LinkEntities = new LinkEntity[] { link }; 

However, it only returns the columns from new_Table1.

Is there a way to link in this fashion and return the columnns from both entities without having to create two queries?

  • 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. 2026-05-11T11:08:24+00:00Added an answer on May 11, 2026 at 11:08 am

    QueryExpression doesn’t support this. You’ll need to use Fetch XML.

    From ‘Using FetchXML’ in the SDK – you’ll end up with something like this:

    <fetch mapping='logical'>       <entity name='account'> <attribute name='accountid'/> <attribute name='name'/> <link-entity name='systemuser' to='owninguser'>    <filter type='and'>       <condition attribute='lastname' operator='ne' value='Cannon' />    </filter>    <attribute name='name' /> </link-entity>       </entity>    </fetch> 

    If you haven’t used FetchXML yet, I highly recommend http://www.stunnware.com/?area=products&group=swtools4 for building and testing FetchXML. That way you can get a preview of your Result XML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 247k
  • Answers 247k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What you want to check out is the email module.… May 13, 2026 at 8:40 am
  • Editorial Team
    Editorial Team added an answer GNU Multiprecision library is a good one! But since you… May 13, 2026 at 8:40 am
  • Editorial Team
    Editorial Team added an answer I suppose you will likely to get CreateException or NameAlreadyBoundException,… May 13, 2026 at 8:40 am

Related Questions

I have a long running process that integrates over a collection of incoming Entities
Ok, Last time I posted this (last week), I didn't describe the problem correctly.
Is there any chance to create temporary stored procedure or function on MS SQL
I just wanted to share this Query class and get your thoughts on it.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.