2

I have a use case of creating/updating the records for a custom object based on a specific Account's record type.

Its on the click of a custom button placed over detail page, its working fine for a user with Author Apex permission. We need to check for the user without Author Apex permission, if calling of future method can satisfy our requirement.

As executing the batch for a particular user is giving below error:

enter image description here

If anyone has any ideas on how I can resolve this, I would be so thankful.

3

Future methods aren't really intended to bypass user permissions.

Based on the error message, maybe you need to grant acess to the required Apex classes based on the users profiles. See Setting Apex Class Access from Profiles

From Controller Class Security

If you have installed a managed package in your organization, you can set security only for the Apex classes in that package that are declared as global, or for classes that contain methods declared as webService.
If users have the “Author Apex” permission, they can access all Apex classes in the associated organization, regardless of the security setting for individual classes.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.