Closed rosieGK closed 10 years ago
Hey Rosie,
This is more of a genral question then specific to Nforce.
You are trying to do a relationship query in SOQL, you need to traverse the relationship to your contact but there is no Contact relationship on Tasks, there is a relationship called the WhoId which contains the contact Id or Lead Id but its not traversable as its a polymorphic relationship as it supports more then one object.
The solution to your problem would be to do two separate queries and map the data together.
Below is some documentation that may help
Eoin
On 18/11/2014, at 8:45 PM, thegogz notifications@github.com wrote:
Thank you so much for your reply. This is really helpful.
Regards Rosie
Hey Rosie,
This is more of a genral question then specific to Nforce.
You are trying to do a relationship query in SOQL, you need to traverse the relationship to your contact but there is no Contact relationship on Tasks, there is a relationship called the WhoId which contains the contact Id or Lead Id but its not traversable as its a polymorphic relationship as it supports more then one object.
The solution to your problem would be to do two separate queries and map the data together.
Below is some documentation that may help
SOQL Documentation
Task Object Documentation
Eoin
— Reply to this email directly or view it on GitHub.
Thanks @thegogz for the help! Closing this.
Hi there
I want to select the contact's address information for a task. I am trying Select task.Id, task.Subject , Contact.MailingStreet from Task. But this is giving me an error Didn't understand relationship 'Contact' in field path. Any help???
Regards Rosie