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

Insufficient Privileges for system adminstrator
Hi All,
I have a custom button on my VF page which display all the acitivities, when i clicked on button I am getting the following the 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.
Click here to return to the previous page.
I am a System Admin, even though getting the above error msg. Any help must be appreciated.
Thanks in advance,
SK
Check the Object level permission, field level security also the sharing setting if any.
Thanks,
Devendra
Thanks for the reply Devendra.
As an admin, I have all the permission on object level. Here is the code snippet for better understanding of the issue
VF:
<apex:pageblockButtons location="top">
<apex:commandButton action="{!ViewAll}" value="ViewAll" />
</apex:pageblockButtons>
Controller:
public PageReference viewAll(){
PageReference pref= new PageReference('/ui/core/activity/ViewAllActivityHistoryPage?retURL=%2F'+cid+'&id='+cid);
pref.setRedirect(true);
return pref;
}
Thank you.
Check your version settings of your VF page and Apex class.
if Version setting of both class and vf page are Different it will error.
Prem
Thanks for the reply prem. Both are same version.
Thanks
My question is, is it possible to access activity/ViewAllActivityHistoryPage from controller ?
PageReferece pref = new PageReference('/ui/core/activity/ViewAllActivityHistoryPage?retURL=%2F'+cid+'&id='+cid);
Yes Possible..
Do it properly.. You can achive
Anything wrong in the following code ?
<apex:pageblockButtons location="top">
<apex:commandButton action="{!ViewAll}" value="ViewAll" />
</apex:pageblockButtons>
Controller:
public PageReference viewAll(){
PageReference pref= new PageReference('/ui/core/activity/ViewAllActivityHistoryPage?retURL=%2F'+cid+'&id='+cid);
pref.setRedirect(true);
return pref;
}
Thanks,
SK
Can you look at the url where you getting the insufficient privileges error? That may give us some hint.
Regards,
Hi,
Im getting error in the Sandox and Production instance as well. I have overridden Activity History related list of Case to remove action buttons (Delete). It is working as expected if i added standard Activity related list along with new one, if I remove standard related list again getting insufficient privileges.
Thanks & Regards,
SK