Skip to main content

I have and 2 objects Account and MyCustomObject__c. Account is the master side of the relationship, and  MyCustomObject__c  is the detail side of the relationship. I have given the read, create and delete permission on Account Object. In the  MyCustomObject__c , the object level permission are blank, but field level permissions are given.  In my trigger method, I have queried fields of  MyCustomObject__c. However, I am getting secure query included inaccessible field

error when I run the test class with the PS assigned to the testing user. 

 

Does anyone know why? Given that the user has object level permission of Account, he should have the object level permission of  MyCustomObject__c. And I have assigned field level permission of  MyCustomObject__c.

 

P.S. The error goes away if I give object level permission in  MyCustomObject__c. 

1 réponse
  1. 10 déc. 2023, 21:46

    Without access to the Object users won't be able to see the child records.

     

    Although they will technically have access to the child records they will not be able to see them without access to the Object itself.