?
Solved

CRM RetrieveMultiple web service

Posted on 2010-11-29
4
Medium Priority
?
953 Views
Last Modified: 2012-06-27
Good morning Experts,

I need to create a "Select contact" pop-up box on a customer's website that allows them to select a contact from their CRM database.  They are using Microsoft CRM 3.0, I'm developing in ASP.Net 2.0

I'm using the CRM web services .RetrieveMultiple method to do the search, user types in a contact name like "smith" and behind-the-scenes I'm building a CRM query to search for %SMITH% and display the results in a datagrid.

The problem is I'd like to display the account (company) name along with each contact.  When I execute the query I get back a BusinessEntityCollection containing all the contacts, and each contact has an AccountID property, but I can't figure out how to get the account name without retrieve the Account object for each AccountID.  

Is there any way to retrieve the first and last names of a Contact, along with their associated Account's name, in a single query?

0
Comment
Question by:mortimer452
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Accepted Solution

by:
Feridun Kadir earned 2000 total points
ID: 34231578
Did you investigate using a QueryExpression with a LinkEntity?
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 34238299
0
 
LVL 8

Expert Comment

by:edemcs
ID: 34238845
mortimer452,
In situations like these, I would suggest updating your BO to include the AccountName as a property without retrieving the entire account object.  You may think that the data is redundant because you'll get that same data when you retrieve the Account object, except, for your process it is more efficient to include the account name with the employee object instead of retrieving the entire object.  

1

Update your query for your employee object to include the account name

2. Update the employee object to also include the account name property

0
 
LVL 3

Author Closing Comment

by:mortimer452
ID: 34270380
Thanks feridun, I'm pretty new to CRM and had no idea such a thing existed, that was exactly what I needed.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question