Issue
Users who are running Mass from a button in Lightning may come across this issue.
By default, the Mass button redirects to the Job Queue Status page - users that don't have the DocGen Admin permission set will see this error.
Error Code
Insufficient Privileges: Missing access to 'PermissionSetAssignment'. (invalid_type) (ExternalError)
Resolution
By default, the Job Queue Status has been chosen to be the redirect location. Update the Mass Button to redirect to a different URL that doesn't require specific permissions.
Redirect after generation:
A Salesforce Lightning List View can be chosen as an alternative. This can not be dynamic unless you wish to develop the code and button independently.
1. Navigate to the desired List View in Lightning and copy the information after the ".com".
2. Replace /apex/loop__jobqueuestatus in line 28 of the Visualforcepage with the desired URL. See the example below:
1. Get the URL:
2. Add to the Visualforce Page:
Additional Information