You need to sign in to do that
Don't have an account?
Visualforce pages access to Users in our org
Hi
We developed few VF pages in sandbox.
When users in our org tries to access the pages in sandbox they are getting the below error
Insufficient privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
Do i need to enable any settings/options on the user profile?
Users access this page by clicking on the custom link on the Home Page.
This is the page and controller
I noticed one more thing. Users with Modify All Data rights are able to access the pages.
Please advise.....Thanks
<apex:page controller="Redirecting_user" action="{!init}" > <apex:form > </apex:form> </apex:page>
public class Redirecting_user { List<customObject__c> cust; public PageReference init() { cust=[select fields__c from customObject__c where ID__c=:UserInfo.getUserId()]; Integer count=cust.size(); return redirectTest(count); } public PageReference redirectTest(Integer count) { PageReference myPR = null; if (count == 0) myPR = Page.ABC1; else myPR = Page.ABC2; if (myPR != null) myPR.setRedirect(true); return myPR; } static testMethod void results() { Redirecting_user test=new Redirecting_user(); test.init(); } }
Go to setup->App setup->Develop->Pages. Click security link and add the profile of the user that needs access to that page.
Do the same for Apex Classes referenced on the page.
All Answers
Go to setup->App setup->Develop->Pages. Click security link and add the profile of the user that needs access to that page.
Do the same for Apex Classes referenced on the page.