function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pramod Kumar 194Pramod Kumar 194 

How To Get Related Contact Name From OpenActivity object

User-added image

SELECT (SELECT  WhoId, Who.name FROM ActivityHistories  limit 5) FROM Account where id='0014100000QIRer'

[{"WhoId":null,"Who":null},{"WhoId":null,"Who":null},{"WhoId":null,"Who":null},{"WhoId":null,"Who":null},{"WhoId":null,"Who":null}]

Here i am unable to query name using query on ActivityHistories , If any one know this thing how we can achive this so confirm me asap
karthikeyan perumalkarthikeyan perumal
Hello, 

Nothing wrong with your Query, you have to double checck the relationship has been made properly or not.

for your  query i got the result.   just remove the condition part in your query and  do the general fetch if its all null. you have to check your relationship.

User-added image
User-added image

Hope this will helps you. 

Thanks
karthik