Created
April 25, 2015 15:50
-
-
Save suddeb/9d0554c4ac5679197961 to your computer and use it in GitHub Desktop.
AccountHelper Future Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AccountHelper { | |
@future | |
public static void updateAccounts(Boolean value,List<Id> accountIds){ | |
List<Account> allAccounts = [SELECT ID,notifyAdmin__c FROM ACCOUNT WHERE ID IN: accountIds]; | |
for(Account anAccount : allAccounts){ | |
anAccount.notifyAdmin__c=value; | |
} | |
if(allAccounts.size() > 0){ | |
update allAccounts; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment