Customer 360 for Salesforce
- Customer 360 for Salesforce Winter 2022
- All Products
trigger Custom_Account_Trigger on Account (after delete, after insert, after update, before delete, before insert, before update) { DSE.API_AccountTriggerHandler apiHandler = new DSE.API_AccountTriggerHandler (); try { apiHandler.initTrigger(); } catch (DSE.API_AccountTriggerHandler.DS_CloudMDMSkipTriggerException es) { return; } catch (Exception e) { throw new DSE.API_AccountTriggerHandler.DS_CloudMDMTriggerAPIException ('Cloud MDM Trigger API Initialization Failed' + e.getMessage()); } try { if (Trigger.isInsert && System.UserInfo.getUserType() != 'Guest') { if (Trigger.isBefore) { apiHandler.Trigger_InsertBefore_Handler(); } else { apiHandler.Trigger_InsertAfter_Handler(); } return; } if (Trigger.isUpdate) { if (Trigger.isBefore) { apiHandler.Trigger_UpdateBefore_Handler(); } else { apiHandler.Trigger_UpdateAfter_Handler(); } return; } if (Trigger.isDelete) { if (Trigger.isBefore) { apiHandler.Trigger_DeleteBefore_Handler(); } else { apiHandler.Trigger_DeleteAfter_Handler(); } return; } } catch (DSE.API_AccountTriggerHandler.DS_CloudMDMPartialTriggerFailureException e) { if (Trigger.isAfter) DSE.API_AccountTriggerHandler.AccountTriggerState = DSE.API_AccountTriggerHandler.TRIGGER_FAILURE_STATUS.TRIGGER_ROLLBACK_INPROGRESS; else DSE.API_AccountTriggerHandler.AccountTriggerState = DSE.API_AccountTriggerHandler.TRIGGER_FAILURE_STATUS.TRIGGER_FAILED; return; } }