From 0953b3b5fcf19c627c6479a6b86648df653c40db Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 09 五月 2022 17:50:33 +0800
Subject: [PATCH] SF PIPL Page Fix Lookup Required issue
---
force-app/main/default/triggers/SWOTrigger.trigger | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/triggers/SWOTrigger.trigger b/force-app/main/default/triggers/SWOTrigger.trigger
index 397c7da..8231412 100644
--- a/force-app/main/default/triggers/SWOTrigger.trigger
+++ b/force-app/main/default/triggers/SWOTrigger.trigger
@@ -1,5 +1,8 @@
trigger SWOTrigger on SWO__c (before insert,after insert,before update) {
- if(trigger.isBefore){
+ if((!Test.isRunningTest())&&UserInfo.getUserId()==System.Label.ByPassTrigger){
+ return;
+ }
+ if(trigger.isBefore){
SWOTriggerHandler.setDateTimeSendEmail(trigger.new, trigger.newMap, trigger.old, trigger.oldMap);
}
if(trigger.isAfter && trigger.isInsert){
--
Gitblit v1.9.1