You need to sign in to do that
Don't have an account?
birdofprey
Apex Data can't be view through VF page.
I have an Apex class that returns a SOQL Set List, where it is display by VF page.
I even tried setting the "Enable Profile Access for Apex Class", and enabling that profile the non System Administrator profile, still till I get nothing.
The data is only showing if I change the profile of that user to a "System Administrator", but not for users who are not of System Administrator profile.
below is my code if it helps, let me know:
private final string UserID = UserInfo.getUserId(); private List<ProcessInstance> ProcessInstanceID {get; set;} public String getUserID() {return UserID;} public ItemsToApproveFF(){ } public List<Financial_Form__c> getFFData() { Set<ID> getID = new Set<Id>(); for(ProcessInstance a : getProcessInstance()){ getID.add(a.TargetObjectId); } List<Financial__c> FFData = [SELECT getReceiptDocLink__c, Name, Company__c, Form_Type_del__c FROM Financial__c Where Id IN :getID]; return FFData; } public List<ProcessInstance> getProcessInstance() { ProcessInstanceID = [SELECT TargetObjectId FROM ProcessInstance Where Id IN (SELECT ProcessInstanceId FROM ProcessInstanceWorkitem Where ActorId = :UserID)]; return ProcessInstanceID; }
Have you reviewed the OWD Settings? Its possible that the OWD settings on the objects are what is causing the issue. If you have OWD set to private, then your users will only be able to see what records they own or have shared with them.
System Administrators will have access to all data in the system usually (View All Data, Modify All Data) options are typically set on Sys Admins.
Click Setup -> Security Controls -> Sharing Settings to see the OWD (Orginization Wide Settings) for your users.
Also, on the user profiles, make sure they have the proper CRUD access to the objects. You can see that on the profile pages.
Yep, i check the settings, in the profile. I made sure that "modifed all" and "read all" for that custom object was checked.
And the current setting for OWD is "Public Read/Write"
The only setting I could not change which my apex is calling is "ProcessInstanceWorkitem" "ProcessInstance" because it is standard.
I notice something now.
Eventhough i have OWD set as "Public Read/Write"
The "Sharing Overrides" it shows that Organization-Wide Permissions with "View All Data" and "Modify All Data" for the custom profiles unchecked.
How do i do check them, that should do it?