Is there a limitation with PermsissionSetAssignment object in Apex. can't we insert the records using apex?
I am unable to compile the class as it is saying "Variable does not exist: AssigneeId" and "Variable does not exist: PermissionSetId"
public static void insertperms(){
PermissionSetAssignment ps = new PermissionSetAssignment();
ps.AssigneeId = UserInfo.getUserId();
ps.PermissionSetId = 'qweqweqwe';
// permList.add(ps);
}
PermissionSetAssignment
in your org?insert new PermissionSetAssignment(AssigneeId = testUser.Id, PermissionSetId = testPermSet.Id);