Blog

Main » 2018 » November » 15
list userlist = [SELECT ID, Name FROM User WHERE et4ae5__ExactTargetForAppExchangeUser__c = TRUE];
 for (User i : userlist){
 try {
 string toDelete = i.id; 
 et4ae5.supportutilities.deleteusertokens(toDelete, TRUE);
 }
 catch (Exception e) {
 system.debug('Current user ='+i.Name+' Parent Record.');
 }
 try {
 et4ae5.supportutilities.deleteusertokens('APIUSER');
 }
 Catch (Exception e) {
 system.debug('API Error');
 }
 }