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
Andrew SteeleAndrew Steele 

Read Access Denied For Visual Force Page

I'm trying to display a table of object permissions. However, when I try to connect my controller with my visualforce page, I'm am receiving a "Read access denied for PermissionSet."

public List customobjectperm{get;set;}

customobjectperm = [SELECT Label, Profile.Name, ProfileId, (SELECT SobjectType, PermissionsEdit FROM ObjectPerms WHERE SObjectType = 'qbdialer__DialerQuery__c'), (SELECT SobjectType, Field, PermissionsRead FROM FieldPerms WHERE SObjectType = 'qbdialer__DialerQuery__c') QFROM PermissionSet WHERE ProfileId = :userId LIMIT 1];

<apex:pageBlockTable value="{!customobjectperm}" var="objectPer" headerClass="permTable">
<apex:column value="{!objectPer.Name}"/>
</apex:pageBlockTable>

Has anyone had this problem or know whats going on here?

Thanks
Shrikant BagalShrikant Bagal
Please make sure that, the user have "Modify all" access in which your class will run.

hope its help!!!