Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I am trying to access data from crm in siverlight through Odata Service.
I want to retrive account info on the basis of contact name.
for the same purpose I used join in my query.
While executing at "_account.LoadAsync(qery2);" I get error that Join is not supported.

My question might be silly but I would be too grateful to you If any one of you could help me out.

Thanks in advance


Namespaces I used

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.ComponentModel;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SilverlightApplication55.ServiceReference1;
using ctccrm.ODataService;
using ctccrm.OrgService;
using System.Data.Services.Client;
using System.Windows.Navigation;
using System.ServiceModel.DomainServices.Client.ApplicationServices;
using System.Windows.Data;
using System.Collections.ObjectModel;
using System.ServiceModel.DomainServices.Client;



Code Snippet

C#
var qery2 = from a in context.AccountSet
            join c in context.ContactSet on a.PrimaryContactId.Id equals c.ContactId
            where c.FullName.Contains("Prateek")
            select a;



account.LoadCompleted += new EventHandler<LoadCompletedEventArgs> _account_LoadCompleted_1);

            _account.LoadAsync(qery2);
Posted

1 solution

Hi,

I am not a very experienced CRM developer but I think the problem is CRM 2011 converts this to an Odata expression which could implement joins using expands but I don't know how but I think even though it does it is quite weak at doing so.
I prefer to write to seperate queries and join them on client side.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900