0

I am trying to put a lightning component to show all the past activities associated with the Contact. It is my understanding that if the user has access to the Contact then he should be able to see the Activities associated with it. But the lightning component to show the data from the below query it works for System Administrator but logging as the other user profile no data is returned

Select id,firstname,lastname,Contact_Salutation_First_and_Last_Name__c,(SELECT Id,Subject,OwnerId,ActivityDate,Owner.Name FROM ActivityHistories ORDER BY LastModifiedDate DESC LIMIT 1) from Contact where AccountId =: recordId and Key_contact__c = true

Can anyone help why the ActivityHistory returns no records for the users even they have access to the Contact and also they can see tasks in Activity Timeline component but not in my component

1 Answer 1

0

This may be related to the View All Data permission. Can you try with a non Sys Admin profile that has View All Data enabled? Faced this issue with EmailMessage object, so I'm guessing the root cause should be similar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .