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
trigger AccountTrigger on Account (after update) { | |
// make a set of all account ids that are not active but previously were active | |
Set<Id> accountsSetToInactive = new Set<Id>(); | |
for(Account acc : trigger.new) { | |
if(!acc.Active_Checkbox__c && trigger.oldMap.get(acc.Id).Active_Checkbox__c) { | |
accountsSetToInactive.add(acc.Id); | |
} | |
} |