How to Join?

Jun 18, 2015 at 7:26 AM
Edited Jun 18, 2015 at 7:29 AM
I try to perform a simple join between price-list-item and price-list but I receive an error:
from pli in ProductPriceLevelSet
join pl in PriceLevelSet on pli.PriceLevelId equals pl.PriceLevelId
select pli
This is the error message (german):
Der Typ eines Ausdrucks in der 'join'-Klausel ist falsch. Fehler beim Typrückschluss im Aufruf von 'Join'.
Translated in english:
The type of one of the expressions in the 'clause' clause is incorrect. Type inference failed in the call to 'Join'
Is something work wiht my LINQ query?


And when i try to change the query to this, I receive the error "The method "Join" is not supported":
from pli in ProductPriceLevelSet
join pl in PriceLevelSet on pli.PriceLevelId.Id equals pl.PriceLevelId
select pli
Jun 22, 2015 at 10:48 AM
Hi,

As this is based on Dynamics CRM REST endpoint, you cannot do what REST endpoint cannot do.
So please try to use other Dynamics CRM driver.

In addition the query should looks like below. pli.PriceLevelId is an EntityReference, thus need .Id to get Id.

from pli in ProductPriceLevelSet
join pl in PriceLevelSet on pli.PriceLevelId.Id equals pl.PriceLevelId
select new {pli}