You need to sign in to do that
Don't have an account?
Salesforce Dreamer
Can my apex code inside a managed package make changes to permission set which is also inside the package?
Hi experts,
I am curious to know if you have come across the below scenario in your implementation.
I have a managed release package (PKG-A) which has the below items:
My above LEX component - A has a button that calls the Apex class - A (AuraEnabled method) which runs the below to modify Permission set - XYZ create access to true:
Now, my question is will the above functionality work?
Thanks for all your support in advance.
I am curious to know if you have come across the below scenario in your implementation.
I have a managed release package (PKG-A) which has the below items:
- LEX Component - A
- Apex Class - A
- Permission set - XYZ [0PS31000000Np44] (Account sObject read access => true)
My above LEX component - A has a button that calls the Apex class - A (AuraEnabled method) which runs the below to modify Permission set - XYZ create access to true:
String parameterValue = '0PS31000000Np44'; PermissionSet ps =[select id,ProfileId,SystemModstamp,UserLicenseId FROM PermissionSet where id=: parameterValue]; ObjectPermissions op = new ObjectPermissions(); op.parentid = ps.id; op.SobjectType = 'Account'; op.PermissionsCreate = true; op.PermissionsRead = true; op.PermissionsEdit = false; insert op;
Now, my question is will the above functionality work?
Thanks for all your support in advance.