Skip to content

Instantly share code, notes, and snippets.

View superCap3's full-sized avatar
🎯
Focusing

superCap3

🎯
Focusing
View GitHub Profile
@gbutt
gbutt / BatchGrantPermissionSet.cls
Created February 8, 2020 15:57
Grant Permission Set or Permission Set Group to Users in Batch Apex
/**
* Assigns a permission set or permission set group to all user with the specified profile.
* Additional filter criteria can be passed in if the users needs filtered further.
* Example: Only assign permission set to community users on the Salesforce account
* String filter = 'Contact.Account.Name = \'Salesforce\'';
* BatchGrantPermissionSet('Community User Profile', 'Salesforce_Account_Privs', filter);
*/
public class BatchGrantPermissionSet implements Database.Batchable<sObject> {
String query {get; set;}
anonymous
anonymous / gist:1406238
Created November 29, 2011 20:09
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially