function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JustinMcNally21JustinMcNally21 

API Version Mismatch Nightmare | Apex Ajax function causing Insufficient Privelege error

Recently I had the most agrevating problem with salesforce yet, hopefull this will help if you have the same:

 

In my case I had a VF Page using a standard controller with an extension that subclasses a virtual class.

 

The Superclass needed to be upgraded from API version 16 to 19 to accomodate making a SOQL call on a Rich Text Area. I upgraded the super class file to API 19.0 and everything compiled, this is when things started to break. After trying to debug the JS and controllers i was going nuts because every time my APEX:Function fired the page was redirected to the Insuffience privleges page, a very misleading error as i check through all the profile and field level security and various other access audits. The error was infact caused by my VF page and subclass still using API Version 16.0 on a hunch I changed them to 19.0 and everything worked as expected. I would plead with salesforce to give better error messages in such situations as their Insufficient Priveleges error is in no way helpful and the Debug Logs returned nothing about the error.