You need to sign in to do that
Don't have an account?
Query with Product2.Family limitation ?
When I run this query:
PriceBookEntry[] pbeList = [SELECT Id,PriceBook2Id,PriceBook2.Name,Product2.Name,Product2.Inzamelmiddel__c,Product2.Description,UnitPrice FROM PriceBookentry WHERE PriceBook2.Name='Pricebookname' AND Product2.Name in :afvalstromen AND Product2.Description in :fqList AND Product2.Inzamelmiddel__c in :piList];
all is fine.
However, the contents from field Inzamelmiddel__c were originally meanth to be stored in standard field Family. But when trying this query:
PriceBookEntry[] pbeList = [SELECT Id,PriceBook2Id,PriceBook2.Name,Product2.Name,Product2.Inzamelmiddel__c,Product2.Description,UnitPrice FROM PriceBookentry WHERE PriceBook2.Name='Pricebookname' AND Product2.Name in :afvalstromen AND Product2.Description in :fqList AND Product2.Family in :piList];
it seems to somehow do a DISTINCT on Family, returning an incorrect (too small) resultset!
Is this a know issue, or did I miss some limitation with querying theFamily (or selectlist in general) field?
FYI: piList is a List<String>, just like fqList and afvalstromen.