You need to sign in to do that
Don't have an account?
Tom Tavernier
SOQL left outer join opportunitylineitems to opportunitylineitemschedule
Trying to query for all opportunity product line dates and child schedule dates :
Any idea why following query does not work ?
"select servicedate, (select scheduledate FROM opportunitylineitemschedule) from opportunitylineitems limit 20"
(ERROR at Row:1:Column:81 sObject type 'opportunitylineitems' is not supported.)
It does work from opportunity to opportunitylineitem
"select closedate, (select servicedate FROM opportunitylineitems) from opportunity limit 20"
Any idea why following query does not work ?
"select servicedate, (select scheduledate FROM opportunitylineitemschedule) from opportunitylineitems limit 20"
(ERROR at Row:1:Column:81 sObject type 'opportunitylineitems' is not supported.)
It does work from opportunity to opportunitylineitem
"select closedate, (select servicedate FROM opportunitylineitems) from opportunity limit 20"
Try below query: Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.
All Answers
Try below query: Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.
Thanks for your reply ! Your query works fine, even without querying on the Id fields.
Next to my typo on the "opportunitylineitemscheduleS" object (did not have the trailing "S"), it also showed me something confusing :
to query on the schedule lines, it looks like the object name is different when querying in a parent query versus querying in a sub-query :
Works fine : select closedate, (select servicedate FROM opportunitylineitemS) from opportunity limit 20 (sub-query)
Gives error : select servicedate FROM opportunitylineitemS limit 20 (parent query)
Works fine : select servicedate FROM opportunitylineitem limit 20 (parent query)
But anyways, thanks, you brought back my concentration :-)
See you, Tom