Associate
- Joined
- 27 Jan 2005
- Posts
- 1,373
- Location
- S. Yorks
I am trying to query Dynamics CRM to return the quote details, so far I can return the quote details for a specific quote, however it returns everything.
How can I get it to return specific columns?
regards,
Matt
Code:
private void BeginRetrieveQuoteDetail(Guid Id)
{
dataGrid1.ItemsSource = null;
_context = new AnconTestContext(ODataUri);
lstQuoteDetails = new DataServiceCollection<QuoteDetail>(_context);
var result = from QuoteDetailSet in _context.QuoteDetailSet.Where<QuoteDetail>(r=> r.QuoteId.Id ==Id) select QuoteDetailSet;
lstQuoteDetails.LoadCompleted += new EventHandler<LoadCompletedEventArgs>(lstQuoteDetails_LoadCompleted);
lstQuoteDetails.LoadAsync(result);
}
private void lstQuoteDetails_LoadCompleted(object sender, LoadCompletedEventArgs e)
{
if (lstQuoteDetails.Continuation != null)
{
lstQuoteDetails.LoadNextPartialSetAsync();
}
else
{
dataGrid1.ItemsSource = lstQuoteDetails;
}
}
How can I get it to return specific columns?
regards,
Matt