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
Harsh Dhruv 10Harsh Dhruv 10 

'ActivityHistories' is not a valid child relationship name for entity Quote

<apex:page standardController="Quote" extensions="abcController" sidebar="false">
    
    <apex:detail />
    
    <div class="relatedList">
        <apex:relatedList list="QuoteDocuments" rendered="{!$User.Quote__c != 'STD' || $User.Quote__c == ''}"/>
        <apex:relatedList list="ActivityHistories" rendered="{!$User.Quote__c != 'STD' || $User.Quote__c == ''}"/>
    </div>
    
</apex:page>


I have two different user and both have different profile as mentioned below,

1. User - Nail
   Profile - Company Manager
2. User - Cristiana
   Profile - System Administrator

for 1st User it's working fine as expected but when i login using 2nd user it will give me an error :

 'ActivityHistories' is not a valid child relationship name for entity Quote

Can anybody know about this ? what's wrong in profile or code ?
 
NagendraNagendra (Salesforce Developers) 
Hi Harish,

Did you check CRUD for Task object for those profiles? Standard controllers enforce FLS and CRUD permissions. They even respect FLS and CRUD permissions.

Thanks,
Nagendra