You need to sign in to do that
Don't have an account?
Charlie Cox
I have used actionFunctions like this before so I am not sure what the issue is.
Any input would be great.
Thanks!
Insufficient Privileges with <apex:actionFunction>
I am the System Admin for our instance. I am currently developing a visualforce page. The System Admin profile has access to the page and controller.
However when I call my action function I get a "Insufficient Privileges" error message.
I investigated further to see that I was getting an Internal Server Error.
I have stripped functionality in the apex method the actionFunction calls until it does nothing. See Below:
public class UtilApplication { public List<List<SelectOption>> display {get;set;} public String assigned {get;set;} Map <String, Schema.SObjectType> objs {get;set;} public UtilApplication() { display = new List<List<SelectOption>>(); objs = Schema.getGlobalDescribe(); List<SelectOption> init_opts = new List<SelectOption>(); // Value | Label init_opts.add(new SelectOption('Student_Application__c','Student Application')); init_opts.add(new SelectOption('Contact','Contact')); display.add(init_opts); System.debug('In constructor'); } // method in question public void add_object() { System.debug('In here'); } }The Visualforce looks like this:
<apex:page showHeader="false" sidebar="false" controller="UtilApplication"> <head> <script> function callJS() { console.log("In this"); select_section(); } </script> </head> <body> <apex:form> <apex:outputPanel id="configure"> <apex:outputPanel> <apex:pageBlock title="Select Section"> <apex:actionFunction name="select_section" action="{!add_object}" reRender="configure"/> <apex:selectList multiselect="false" value="{!assigned}" size="1" onchange="callJS()"> <apex:selectOptions value="{!display[0]}"/> </apex:selectList> </apex:pageBlock> </apex:outputPanel> </apex:outputPanel> </apex:form> </body> </apex:page>
I have used actionFunctions like this before so I am not sure what the issue is.
Any input would be great.
Thanks!
All Answers
Try below code and let me know if issue is still there. Thanks,
Gaurav