You need to sign in to do that
Don't have an account?
Sarthak Bajaj 6
SOQL for opportunitylineitem
I want to get Employer_Meeting_Date__c field from opportunitylineitem but the condition is that i want only those recoeds for which task is created therefore related to field(whatid) need to be used.
the query which i currently used is
SELECT Employer_Meeting_Date__c,Id,OpportunityId FROM OpportunityLineItem WHERE OpportunityId IN (select id from opportunity where id IN (select whatid from task))
but it is giving an error
MALFORMED_QUERY:
where id IN (select whatid from task))
^
ERROR at Row:1:Column:158
Nesting of semi join sub-selects is not supported
the query which i currently used is
SELECT Employer_Meeting_Date__c,Id,OpportunityId FROM OpportunityLineItem WHERE OpportunityId IN (select id from opportunity where id IN (select whatid from task))
but it is giving an error
MALFORMED_QUERY:
where id IN (select whatid from task))
^
ERROR at Row:1:Column:158
Nesting of semi join sub-selects is not supported
SELECT Employer_Meeting_Date__c,Id,OpportunityId FROM OpportunityLineItem WHERE OpportunityId IN ( select whatid from task)
I tried your query, but this query is also giving an error which states:
ERROR at Row:1:Column:119
Entity 'task' is not supported for semi join inner selects
The approach which i then selected is creating a new SET
This fetches only the oppoortunityid from task which are required.Then
This solved my purpose.Still i didn't came to know why cant i directly query task object using joins.