From 2bb4a2bc34048f49815846db354b5c8994669a3c Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 09 五月 2022 17:48:43 +0800
Subject: [PATCH] SF PIPL Page Backup
---
force-app/main/default/triggers/ContactTrigger.trigger | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/triggers/ContactTrigger.trigger b/force-app/main/default/triggers/ContactTrigger.trigger
index 40b9a9a..a878a2e 100644
--- a/force-app/main/default/triggers/ContactTrigger.trigger
+++ b/force-app/main/default/triggers/ContactTrigger.trigger
@@ -1,4 +1,15 @@
-trigger ContactTrigger on Contact (before insert,after insert, after update, after delete, before Update) {
- ContactTriggerHandler handler = new ContactTriggerHandler();
- handler.run();
+trigger ContactTrigger on Contact (before insert, before update, after insert) {
+ if((!Test.isRunningTest())&&UserInfo.getUserId()==System.Label.ByPassTrigger){
+ return;
+ }
+ if (Trigger.isBefore && Trigger.isInsert) {
+ ContactTriggerHandler.setIsNew(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
+ }
+ if (Trigger.isBefore && Trigger.isUpdate) {
+ ContactTriggerHandler.updateForDealer(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
+ ContactTriggerHandler.dealerContactApproval(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
+ }
+ if ((Trigger.isAfter && Trigger.isInsert) || (Trigger.isBefore && Trigger.isUpdate)) {
+ SBG001TriggerHandler.SBG001ContactTrigger(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1