You need to sign in to do that
Don't have an account?
Shivom Verma 35
Assign permission set to user using trigger
Write a Trigger when Admin creating new user if he select chekbox (create new ReadEditPermissionset on Account) assign that permission to that new user,if systemAdministrator deselect ,Remove that permission.
Based on https://trailblazer.salesforce.com/ideaView?id=08730000000DrBwAAK currently, it is not possible to have a trigger on PermissionSetAssignment.
Related : https://salesforce.stackexchange.com/questions/224286/trigger-on-permissionsetassignment-object-and-alternatives/224289
If this information helps, please mark the answer as best. Thank you
I would suggest you use this on the user trigger, I have used a boolean field 'assign_permission__c' on user object.
Supposingly you will need to make few changes according to your requirement:
Thanks