You need to sign in to do that
Don't have an account?

Visual force with Permission Sets
I have created permission set for a user and assigned it.
The user does not have view all/,odify all for the object
When I see results on visualforce page , it brings back ll the records,
Cn you suggest a solution ?
The user does not have view all/,odify all for the object
When I see results on visualforce page , it brings back ll the records,
Cn you suggest a solution ?
Check what is the access level set for the controller (with sharing or without sharing)
Use the with sharing or without sharing keywords on a class to specify whether or not to enforce sharing rules.
By default apex runs in system context that is without sharing.
The with sharing keyword allows you to specify that the sharing rules for the current user be taken into account for a class. You have to explicitly set this keyword for the class because Apex code runs in system context. In system context, Apex code has access to all objects and fields— object permissions, field-level security, sharing rules aren’t applied for the current user. This is to ensure that code won’t fail to run because of hidden fields or objects for a user.
Use with sharing in your constructor to restrict the results to only to the records the user have access.
Refer the below link
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm
Mark this as "SOLVED" if your query is answered
Thanks & Regards,
Bhanu Mahesh Gadi
Can you suggest an alternative?
Also please check whether there are any sharing rules on the object that shares the records withe user.
Check what is the role of the user, if the role is higher in the heirarchy, he will have access to all the records that belongs to the users who are below in the heirarchy
Thanks & Regards,
Bhanu Mahesh Gadi