Solved

CRM RetrieveMultiple web service

Posted on 2010-11-29
4
933 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
4 Comments
 
LVL 29

Accepted Solution

by:
feridun earned 500 total points
Comment Utility
Did you investigate using a QueryExpression with a LinkEntity?
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
Comment Utility
0
 
LVL 8

Expert Comment

by:edemcs
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn the different options available in the Backstage view in Excel 2013.
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now