Is there any chance to add Apex Class Access to a permission set programmatically? E.g. the following code allows adding field permissions to the perm set.
insert new FieldPermissions(
ParentId = '0PSXXXXXXXXXXXX', // perm set id
SobjectType = SObjectType.Account.getName(),
Field = Account.Type.getDescribe().getName(),
PermissionsRead = true,
PermissionsEdit = false,
);
Does anyone know how to do the same with Apex Classes?