You need to sign in to do that
Don't have an account?
Insufficient privileges
The controller that I have created is :
public class CandidateList {
Candidate__c candidate ;
public Candidate__c getCandidate() {
Id id = ApexPages.currentPage().getParameters().get('id');
candidate = [Select Id, Name from Candidate__c
where id = :ApexPages.currentPage().getParameters().get('id')];
return candidate;
}
-----------------
and the page that i developed
<apex:page Controller="CandidateList">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are displaying Candidates List.
Mouse over a Candidate's name to view his or her details.
</apex:pageBlock>
<apex:pageBlock title="Candidates">
<apex:form >
<apex:dataTable value="{!candidate}" var="contact" cellPadding="4"
border="1">
<apex:column >
<apex:outputPanel >
<apex:actionSupport event="onmouseover" rerender="detail">
<apex:param name="cid" value="{candidate__c.id}"/>
</apex:actionSupport>
{!contact.Name}
</apex:outputPanel>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:outputPanel id="detail">
<apex:actionStatus startText="Requesting...">
<apex:facet name="stop">
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"
title="false"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:page>
Can any one suggest y I am getting Insufficient privileges when I am putting mouse on the value to get the detail
Please check sharing rules might be possible you have some sharing rules that do not allow actions on record by any other then record owner.
All Answers
If you are getting the error "Insufficient Privileges" then nothing to do with your code. Problem is in profile permissions. I hope you are not logged in as System Administrator.
If you are logged in as Partner Portal or Customer Portal then just go to the profile : Setup > Administration Setup > Manage Users > Profile.
Provide all permissions to candidate object.
If you are doing this from site then Goto : Setup > App Setup > Develop > Sites > Click on Site Label > Public Access Setting > Provide access to object Candidate.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
You can follow the same path Setup > Administration Setup > Manage User > Profile > System Administration
And provide all permissions for object you are using in code. Also verify your visualforce page and apex class is added on that profile.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
I have checked and all the permissions are given for standard and custom objects in System Administrator profile
Checked the apex page and class both are having permissions for the System Administrator profile only....
But still getting error as:
Please check sharing rules might be possible you have some sharing rules that do not allow actions on record by any other then record owner.
Hello Shashi..! I have the same issue.. I've even tried checking sharing rules too and it didn't worked.. Infact I have no sharing rules defined and im a system admin user. I've given permissions to all the fields for all standard and custom objects.
Just check this:
Goto Administration setup-->security controls-->Sharing settings
In this if ur Object is custom object then its default access is Private so change that to public then it wil work
No its not Private.. Its Public Read Write already and its not working..