Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

(Trigger.isInsert || Trigger.

isUpdate) {

for (TBO001_AccountClassification__c classification : Trigger.new) {

if (!accountSet.contains(classification.TBO001_rb_Account__c)) {

accountSet.add(classification.TBO001_rb_Account__c);

if (!ownerIdsSet.contains(classification.OwnerId)) {

ownerIdsSet.add(classification.OwnerId);

accountClassificationIdSet.add(classification.Id);

//

else if (Trigger.isDelete) {

for (TBO001_AccountClassification__c classification : Trigger.old) {

if (!accountSet.contains(classification.TBO001_rb_Account__c)) {

accountSet.add(classification.TBO001_rb_Account__c);

if (!ownerIdsSet.contains(classification.OwnerId)) {

ownerIdsSet.add(classification.OwnerId);

//

accountClassificationIdSet.add(classification.Id);

System.debug('Is Insert: ' + Trigger.isInsert);

System.debug('Is Update: ' + Trigger.isUpdate);

System.debug('Is Delete: ' + Trigger.isDelete);


System.debug('Account Set: ' + accountSet);

Map<Id, Account> accountMap = new Map<Id, Account>();

Set<String> accountExtRefIdSet = new Set<String>();

/**

List<Account> accountList;

try {

accountList = [SELECT Id, ACC_tx_Account_Tier__c, ACC_tx_EXT_REF_ID__c,


ACC_tx_Customer_Since__c, CreatedDate, ACC_un_Capex_Exposure__c,
ACC_un_Technology_Exposure__c, ACC_un_Fleet_Exposure__c,
ACC_un_Real_Estate_Exposure__c, ACC_tx_Account_Status__c FROM Account WHERE Id IN
:accountSet];

catch (Exception exAccList) {

System.debug('Error: ' + exAccL(Trigger.isInsert || Trigger.isUpdate) {

for (TBO001_AccountClassification__c classification : Trigger.new) {

if (!accountSet.contains(classification.TBO001_rb_Account__c)) {

accountSet.add(classification.TBO001_rb_Account__c);

if (!ownerIdsSet.contains(classification.OwnerId)) {

ownerIdsSet.add(classification.OwnerId);

accountClassificationIdSet.add(classification.Id);

//

else if (Trigger.isDelete) {
for (TBO001_AccountClassification__c classification : Trigger.old) {

if (!accountSet.contains(classification.TBO001_rb_Account__c)) {

accountSet.add(classification.TBO001_rb_Account__c);

if (!ownerIdsSet.contains(classification.OwnerId)) {

ownerIdsSet.add(classification.OwnerId);

//

accountClassificationIdSet.add(classification.Id);

System.debug('Is Insert: ' + Trigger.isInsert);

System.debug('Is Update: ' + Trigger.isUpdate);

System.debug('Is Delete: ' + Trigger.isDelete);

System.debug('Account Set: ' + accountSet);

Map<Id, Account> accountMap = new Map<Id, Account>();

Set<String> accountExtRefIdSet = new Set<String>();

/**

List<Account> accountList;

try {

accountList = [SELECT Id, ACC_tx_Account_Tier__c, ACC_tx_EXT_REF_ID__c,


ACC_tx_Customer_Since__c, CreatedDate, ACC_un_Capex_Exposure__c,
ACC_un_Technology_Exposure__c, ACC_un_Fleet_Exposure__c,
ACC_un_Real_Estate_Exposure__c, ACC_tx_Account_Status__c FROM Account WHERE Id IN
:accountSet];

}
catch (Exception exAccList) {

System.debug('Error: ' + exAccL

You might also like