Is it possible to assign permission setting using code? Are there any limitations to consider?
YES, it’s possible as below:
PermissionSetAssignment psa = new PermissionSetAssignment (PermissionSetId = myPermissionSetId, AssigneeId = UserId); insert psa;
Pingback: How to add Apex Class Access to permission set programmatically – SFDCian