You need to sign in to do that
Don't have an account?
Ad_Infosys
Error in the Relationship query.
I have a query that has to extract data from objects in relationship.
I am geeting error in the.
select (select opportunitycontactrole.contact.best_contact_time__c from opportunity.opportunitycontactroles),opportunity.of_pending_stips__c,opportunity.closing_state__c,opportunity.stagename,opportunity.age__c,opportunity.closedate,opportunity.offer__c from task where owneradentid__c='0'
Can anyone help me correct.
- OpportunityContactRole has no s at the end.
- Are you trying to select this from Task or from Opportunity?
- You are trying to use aliases you never defined.
If I want to access opportunity field from the task associated to it.
I want to access the opportunity details for evry open task.
Select what.owneradentid__c from task where id='..';
owneradentid__c is a field inside opportunity.
This doesnt work. Requirement is to do this in 1 query. I can do this in 2 queries but for several tasks I will hit my governor limit for number of SOQL.
If I use sets, then only unique records in opprtunity are returned.
I want exhaustive list of all tasks, related opportunites. This will be sent as it is to the client application.
Just I want to suggest you to use - Force.com IDE (Eclipse) or Apex explorer. Where you can buid your queries very easily and view results.