You need to sign in to do that
Don't have an account?
moverdorf
How To Get Related Contact Name From OpenActivity object...
Hi all,
The WhoId is always showing null for my query shown below, and I need to get the related CONTACT name for each Open Activity.
Can anyone tell me why the WhoId would not be getting populated and how I could get CONTACT names ?
select id, Name,
(SELECT Id,whoid,whatid,ownerid,payout__Category__c,ActivityDate,Description,Subject,IsClosed,CallType,CallDisposition,Status,ActivityType,IsTask
FROM OpenActivities ) from Account where Name like '%Akers%'
[{"Id":"00TA000000lF8uQMAS","WhoId":null,"WhatId":"001A000000SMWrUIAX","OwnerId":"005A0000000JrNJIA0","payout__Category__c":null,"ActivityDate":"2012-08-16","Description":"The Investment Tiered Payout Rate for the Advisor has just changed.","Subject":"New Inv Tiered Payout Rate","IsClosed":false,"CallType":null,"CallDisposition":null,"Status":"Not Started","ActivityType":"1_","IsTask":true},{"Id":"00TA000000lF9IUMA0","WhoId":null,"WhatId":"001A000000SMWrUIAX","OwnerId":"005A0000000JrNJIA0","payout__Category__c":null,"ActivityDate":"2012-08-16","Description":"The Investment Tiered Payout Rate for the Advisor has just changed.","Subject":"New Inv Tiered Payout Rate","IsClosed":false,"CallType":null,"CallDisposition":null,"Status":"Not Started","ActivityType":"1_","IsTask":true}]
The WhoId is always showing null for my query shown below, and I need to get the related CONTACT name for each Open Activity.
Can anyone tell me why the WhoId would not be getting populated and how I could get CONTACT names ?
select id, Name,
(SELECT Id,whoid,whatid,ownerid,payout__Category__c,ActivityDate,Description,Subject,IsClosed,CallType,CallDisposition,Status,ActivityType,IsTask
FROM OpenActivities ) from Account where Name like '%Akers%'
[{"Id":"00TA000000lF8uQMAS","WhoId":null,"WhatId":"001A000000SMWrUIAX","OwnerId":"005A0000000JrNJIA0","payout__Category__c":null,"ActivityDate":"2012-08-16","Description":"The Investment Tiered Payout Rate for the Advisor has just changed.","Subject":"New Inv Tiered Payout Rate","IsClosed":false,"CallType":null,"CallDisposition":null,"Status":"Not Started","ActivityType":"1_","IsTask":true},{"Id":"00TA000000lF9IUMA0","WhoId":null,"WhatId":"001A000000SMWrUIAX","OwnerId":"005A0000000JrNJIA0","payout__Category__c":null,"ActivityDate":"2012-08-16","Description":"The Investment Tiered Payout Rate for the Advisor has just changed.","Subject":"New Inv Tiered Payout Rate","IsClosed":false,"CallType":null,"CallDisposition":null,"Status":"Not Started","ActivityType":"1_","IsTask":true}]
I tried the same query in my test ORG - workbench and developer console and am able to fetch the whoID..Are you sure the tasks you trying to pullhave a contact associated to them?
I know this issue is quite old, but coule tell how you solved your issue? As I have the same one.
is there any other way to fix it , without changing the version of the class
https://developer.salesforce.com/forums/?id=906F0000000AfgYIAS