0

I am trying to import the Apex Class Access from a csv file to a permission set using Apex code.....I cant able to find a field type to set the Apex class enabled since then it can be accessed by the allowed users.I completed importing Object settings which has "ObjectPermissions" object name so similarly i need an object and related field names to get access to a particular single permission set. Thanks in advance.,

1 Answer 1

0

It's called SetupEntityAccess, and can be used to specify several different types of Setup objects to grant access to, including Apex classes. Please note that you will need the Apex Class Id in order to associate the permissions.

3
  • Can u please explain more on this..I dont have any idea about how to import but i did export the APEX CLASS ACCESS from a permission set using Setup entity access
    – Lokesh
    Commented Jul 26, 2019 at 4:23
  • @Lokesh I'm not sure what you're trying to do, exactly. If you're just migrating using the metadata API, the permissions are part of the PermissionSet object file.
    – sfdcfox
    Commented Jul 26, 2019 at 4:53
  • Rather than enabling an apex class access of a permissions set manually, i'm trying to do it in a programmatic manner. So i have a csv file where i pass details which can be applied to a permission set and an apex code to convert the details in the csv file into inputs to a permission set. All i need now is a Sobject name of a permissionset which allows to access ApexclassAccess session in a permission set
    – Lokesh
    Commented Jul 26, 2019 at 5:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .