From 3be37dc1c2b6e45450d7a8cbce53b2a76cae35bb Mon Sep 17 00:00:00 2001
From: 游畅 <youchang@prec-tech.com>
Date: 星期日, 24 四月 2022 16:59:16 +0800
Subject: [PATCH] 再来的新数据:新建的时候待入职的就不新建,只有在职的新建。 现在已经新建了的待入职,什么时候状态变在职,什么时候再更新一次,之后也是除非状态再变离职,否则不更新。
---
force-app/main/default/triggers/SyncProduct2.trigger | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/triggers/SyncProduct2.trigger b/force-app/main/default/triggers/SyncProduct2.trigger
index 3e47de9..f434683 100644
--- a/force-app/main/default/triggers/SyncProduct2.trigger
+++ b/force-app/main/default/triggers/SyncProduct2.trigger
@@ -13,8 +13,8 @@
for (Product2 pr2 : Trigger.new) {
if (Trigger.isInsert
|| Trigger.isUpdate
- && (pr2.Name != Trigger.oldMap.get(pr2.Id).get('Name')
- || pr2.Asset_Model_No__c != Trigger.oldMap.get(pr2.Id).get('Asset_Model_No__c')
+ && (pr2.Name.equals(Trigger.oldMap.get(pr2.Id).get('Name'))
+ || pr2.Asset_Model_No__c.equals(Trigger.oldMap.get(pr2.Id).get('Asset_Model_No__c'))
|| pr2.IsActive != Trigger.oldMap.get(pr2.Id).get('IsActive')
|| pr2.SFDA_Status__c != Trigger.oldMap.get(pr2.Id).get('SFDA_Status__c')))
pr2s.add(pr2);
--
Gitblit v1.9.1