You need to sign in to do that
Don't have an account?
Surya Teja Pothureddy
Need help on a SOQL
Hi friends,
Can someone help me in writing a query where i need to get only those contacts who have one or more activity history records? I can up with a solution like this :
select id, first_activity_date__c,LastActivityDate, (select id, createddate from activityhistories) from contact where first_activity_date__c = null and LastActivityDate != null
But even the above returns some records without activity histories. We cannot put a sub query as a filter as it is not allowing for the same. Help is appreciated. Thanks.
Can someone help me in writing a query where i need to get only those contacts who have one or more activity history records? I can up with a solution like this :
select id, first_activity_date__c,LastActivityDate, (select id, createddate from activityhistories) from contact where first_activity_date__c = null and LastActivityDate != null
But even the above returns some records without activity histories. We cannot put a sub query as a filter as it is not allowing for the same. Help is appreciated. Thanks.
Try like this, Let me know if it helps