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
Mubeena SulthanaMubeena Sulthana 

Problem While Executing Async SOQL ??

Hi,
I'm getting an Error while executing Async SOQL as "errorCode":"INSUFFICIENT_ACCESS","message":"You don’t have permission to query this object Account with Async SOQL.
What Permissions I have to give ,Am I Missing anything here ...Please Let Me Know Thanks in Advance
Ginny MahantGinny Mahant
Could you please inform as to how you are running this query ? Maybe the user doesn't have access to the object you are querying. Check object settings for profile and sharing rules.
Mubeena SulthanaMubeena Sulthana
Hi Ginny ,
I'm running the query by using Apex code.
And I'm referring the Doc file https://resources.docs.salesforce.com/sfdc/pdf/async_soql_guide.pdf
But I'm not getting this Error while inserting the data from some xyz Bigobject to abc BigObject .I'm getting Error only While Insertion of data from Sobject to BigObject
 
Ginny MahantGinny Mahant
Hi Mubeena,

  The error says that the user in whose context this apex code is running doesn't have access to query ACCOUNT sobject. Please check the OWD and profile setting for Account sobject NOT the abc/xyz bigobject. Make sure the user has Read access on Account object from his profile. Do you have the 'with sharing' clause on your class in apex code ? Are you running this apex code from execute anonymous in developer console ? 

We can connect over skype if you would like to for faster resolution. 
Mubeena SulthanaMubeena Sulthana
Hi Ginny,
I Just gone through what u said and checked for account Sobject has already with read access and abc/xyz Big object also have read access but I'm getting same error the above one.
I'm executing this code in anonymous (developer console) and code is running with 'With sharing class'.would you give more details why i'm getting this Error while inserting the data from Sobject to Bigobject.
Ginny MahantGinny Mahant
Hi Mubeena,

 If you are executing apex from developer console->execute anonymous block then the code runs in the context of the logged in user. Incase, you are logged in with a user (who is not the admin because admin will have access View All Modify Alla access mostly), then the profile settings and sharing settings of that user will apply. Also, you are enforcing 'with sharing' on your apex class. So, the user must have access to the Account RECORD ALONG with access to Account OBJECT. You mentioned that user already has Read access on Account OBJECT but does this user have access to Account RECORD also is what we need to check here. This is the reason for the error. Request you please share the code.

Do go through Page 2-5 particularly on this document to understand the difference between profile level permissions and settings and OWD - http://resources.docs.salesforce.com/206/14/en-us/sfdc/pdf/sharing_architecture.pdf.