You need to sign in to do that
Don't have an account?
IT Admin 179
soql contact -> task
1. I was trying to do the soql code for
select contact.name from task
or select contact__r.name from Task__C
both do not work
contact and task are having relatinoship of parent to child
-----------------------
2. I am trying to code soql in order to get the information that:
get name for each task : (task1. name= John, Smith , Task2.name = John, Smith) --Name in the Task can appear more than once since there are many task of same person
may I get help from You?
Thanks
Tim
select contact.name from task
or select contact__r.name from Task__C
both do not work
contact and task are having relatinoship of parent to child
-----------------------
2. I am trying to code soql in order to get the information that:
get name for each task : (task1. name= John, Smith , Task2.name = John, Smith) --Name in the Task can appear more than once since there are many task of same person
may I get help from You?
Thanks
Tim
I would query like this, Above query will fetch all the contacts in the database (I mean at least 50,000) but however, if you want to fetch only specifics contacts then you can define List of Ids and then fetch accordingly. How?
List<Id> ConIds = New List<Id>();
Imagine this list has about 20 contact Ids. (The specific ones that you needed task records for)
Now we can just simply change our query by little by adding WHERE cluse. This way our list named "gettingContactRecords" would only fetch those 20 contacts with their task information.
Hope this helps and if it solves the query then please mark it solved!
Use the Below SOQL to get Contact Tasks. Use the parent relationship 'Who' to filter on parent fields