Solved

CRM RetrieveMultiple web service

Posted on 2010-11-29
4
951 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 29

Accepted Solution

by:
Feridun Kadir earned 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

724 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