From ba1c90575c47f9cb5c2ce0a20da90d3b1739b5fa Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 26 四月 2022 11:47:45 +0800
Subject: [PATCH] 0425 Commit
---
force-app/main/default/triggers/ContactTrigger.trigger | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/triggers/ContactTrigger.trigger b/force-app/main/default/triggers/ContactTrigger.trigger
index 9e99031..a878a2e 100644
--- a/force-app/main/default/triggers/ContactTrigger.trigger
+++ b/force-app/main/default/triggers/ContactTrigger.trigger
@@ -1,5 +1,8 @@
trigger ContactTrigger on Contact (before insert, before update, after insert) {
- if (Trigger.isBefore && Trigger.isInsert) {
+ 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) {
--
Gitblit v1.9.1