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
Mallaurie Mulciba 24Mallaurie Mulciba 24 

batch and user

Hi,

I have created a custom link on a home. it's a java on click. Unfortunately when a user with a non admin profile click on the link the batch is not launched whereas he has all the permission sets on his profile. I checked the debug log with the user and i have the following message  "18:14:00.6 (9927772)|FATAL_ERROR|System.SecurityException: Required permissions are not enabled.".  I don't see what is the problem since the user has all the apex and visual force permissions. and he has access to the objects concerned into the batch.
This user has a salesforce platform license. But i don't think it can be a matter.
Anyone has already face this type of issues?
Best Answer chosen by Mallaurie Mulciba 24
Pankaj_GanwaniPankaj_Ganwani
Hi Mallaurie,

To run the Apex code, the user profile must have 'Author Apex' permission enabled. For Platform Users, this permission is not enlisted in "Administrative Permissions" section, this is why they cannot execute the batch process. Also, we cannot create permission set containing this permission.

Thanks,
Pankaj

All Answers

Pankaj_GanwaniPankaj_Ganwani
Hi Mallaurie,

To run the Apex code, the user profile must have 'Author Apex' permission enabled. For Platform Users, this permission is not enlisted in "Administrative Permissions" section, this is why they cannot execute the batch process. Also, we cannot create permission set containing this permission.

Thanks,
Pankaj
This was selected as the best answer
Mallaurie Mulciba 24Mallaurie Mulciba 24
Hi Pankaj,


Thanks for your answer. This is totally the problem. Do you know if It exist a workaround that i can use to make a user launch a batch even if he does not have the required permission. Is there anything i can put in the code to do that?