From 1b1347f2e6d40aa75bbfdfb4789d60efeff13ea8 Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期五, 15 四月 2022 09:41:12 +0800
Subject: [PATCH] LS内贸未发货和以后的不显示二级经营证(临时)
---
force-app/main/default/classes/Product2TriggerHandlerTest.cls | 344 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 337 insertions(+), 7 deletions(-)
diff --git a/force-app/main/default/classes/Product2TriggerHandlerTest.cls b/force-app/main/default/classes/Product2TriggerHandlerTest.cls
index 4bb1f35..bc8e45b 100644
--- a/force-app/main/default/classes/Product2TriggerHandlerTest.cls
+++ b/force-app/main/default/classes/Product2TriggerHandlerTest.cls
@@ -28,7 +28,8 @@
prd.Name = 'testSBG004';
prd.IsActive = true;
prd.Level_Category__c = '';
- prd.demoteer_Sap__c = Date.today();
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(-4);
insert prd;
Product_Register__c PRC = new Product_Register__c();
@@ -36,16 +37,34 @@
PRC.MedPrdClass__c = '1';
PRC.RegisterNoClass_New__c = '';
PRC.RegisterNoClass_Old__c = '6822';
- PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
PRC.ClinicalProductCode__c = 'YYYY';
- PRC.ValidTo__c = Date.today().addDays(22);
- PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today();
insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '2';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today().addDays(1);
+ insert PRC1;
Product_Register_Link__c prl = new Product_Register_Link__c();
prl.Product2__c = prd.ID;
prl.Product_Register__c = PRC.ID;
insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
}
@isTest static void test_checkProduct2Level1() {
@@ -55,7 +74,8 @@
prd.Name = 'testSBG004';
prd.IsActive = true;
prd.Level_Category__c = '';
- prd.demoteer_Sap__c = Date.today();
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(-4);
insert prd;
Product_Register__c PRC = new Product_Register__c();
@@ -67,12 +87,30 @@
PRC.ClinicalProductCode__c = 'YYYY';
PRC.ValidTo__c = Date.today().addDays(22);
PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '1';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today();
+ insert PRC1;
Product_Register_Link__c prl = new Product_Register_Link__c();
prl.Product2__c = prd.ID;
prl.Product_Register__c = PRC.ID;
insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
}
@isTest static void test_checkProduct2Level2() {
@@ -82,7 +120,8 @@
prd.Name = 'testSBG004';
prd.IsActive = true;
prd.Level_Category__c = '';
- prd.demoteer_Sap__c = Date.today();
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(-4);
insert prd;
Product_Register__c PRC = new Product_Register__c();
@@ -90,16 +129,307 @@
PRC.MedPrdClass__c = '';
PRC.RegisterNoClass_New__c = '';
PRC.RegisterNoClass_Old__c = '6822';
- PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
PRC.ClinicalProductCode__c = 'YYYY';
PRC.ValidTo__c = Date.today().addDays(22);
PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today();
insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ insert PRC1;
+
+ Product_Register__c PRC2 = new Product_Register__c();
+ PRC2.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC2.MedPrdClass__c = '';
+ PRC2.RegisterNoClass_New__c = '';
+ PRC2.RegisterNoClass_Old__c = '6822';
+ PRC2.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC2.ClinicalProductCode__c = 'YYYY';
+ PRC2.ValidTo__c = Date.today().addDays(22);
+ PRC2.ValidFrom__c = Date.today().addDays(-22);
+ PRC2.Stelsedag__c = Date.today();
+ insert PRC2;
+
Product_Register_Link__c prl = new Product_Register_Link__c();
prl.Product2__c = prd.ID;
prl.Product_Register__c = PRC.ID;
insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ Product_Register_Link__c prl2 = new Product_Register_Link__c();
+ prl2.Product2__c = prd.ID;
+ prl2.Product_Register__c = PRC2.ID;
+ insert prl2;
}
+ @isTest static void test_checkProduct2Level3() {
+ Product2 prd = new Product2();
+ prd.Product_ECCode__c = 'testSBG004';
+ prd.ProductCode = 'testSBG004';
+ prd.Name = 'testSBG004';
+ prd.IsActive = true;
+ prd.Level_Category__c = '';
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(5);
+ insert prd;
+
+ Product_Register__c PRC = new Product_Register__c();
+ PRC.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC.MedPrdClass__c = '1';
+ PRC.RegisterNoClass_New__c = '';
+ PRC.RegisterNoClass_Old__c = '6822';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.ClinicalProductCode__c = 'YYYY';
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
+ insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '2';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today();
+ insert PRC1;
+
+
+ Product_Register_Link__c prl = new Product_Register_Link__c();
+ prl.Product2__c = prd.ID;
+ prl.Product_Register__c = PRC.ID;
+ insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ }
+
+ @isTest static void test_checkProduct2Level4() {
+ Product2 prd = new Product2();
+ prd.Product_ECCode__c = 'testSBG004';
+ prd.ProductCode = 'testSBG004';
+ prd.Name = 'testSBG004';
+ prd.IsActive = true;
+ prd.Level_Category__c = '';
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(5);
+ insert prd;
+
+ Product_Register__c PRC = new Product_Register__c();
+ PRC.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC.MedPrdClass__c = '2';
+ PRC.RegisterNoClass_New__c = '';
+ PRC.RegisterNoClass_Old__c = '6822';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.ClinicalProductCode__c = 'YYYY';
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
+ insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '1';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today();
+ insert PRC1;
+
+
+
+ Product_Register_Link__c prl = new Product_Register_Link__c();
+ prl.Product2__c = prd.ID;
+ prl.Product_Register__c = PRC.ID;
+ insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ }
+
+ @isTest static void test_checkProduct2Level5() {
+ Product2 prd = new Product2();
+ prd.Product_ECCode__c = 'testSBG004';
+ prd.ProductCode = 'testSBG004';
+ prd.Name = 'testSBG004';
+ prd.IsActive = true;
+ prd.Level_Category__c = '';
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(5);
+ insert prd;
+
+ Product_Register__c PRC = new Product_Register__c();
+ PRC.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC.MedPrdClass__c = '';
+ PRC.RegisterNoClass_New__c = '';
+ PRC.RegisterNoClass_Old__c = '6822';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.ClinicalProductCode__c = 'YYYY';
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
+ insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ insert PRC1;
+
+ Product_Register__c PRC2 = new Product_Register__c();
+ PRC2.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC2.MedPrdClass__c = '';
+ PRC2.RegisterNoClass_New__c = '';
+ PRC2.RegisterNoClass_Old__c = '6822';
+ PRC2.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC2.ClinicalProductCode__c = 'YYYY';
+ PRC2.ValidTo__c = Date.today().addDays(22);
+ PRC2.ValidFrom__c = Date.today().addDays(-22);
+ PRC2.Stelsedag__c = Date.today();
+ insert PRC2;
+
+ Product_Register_Link__c prl = new Product_Register_Link__c();
+ prl.Product2__c = prd.ID;
+ prl.Product_Register__c = PRC.ID;
+ insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ Product_Register_Link__c prl2 = new Product_Register_Link__c();
+ prl2.Product2__c = prd.ID;
+ prl2.Product_Register__c = PRC2.ID;
+ insert prl2;
+ }
+
+ @isTest static void test_checkProduct2Level6() {
+ Product2 prd = new Product2();
+ prd.Product_ECCode__c = 'testSBG004';
+ prd.ProductCode = 'testSBG004';
+ prd.Name = 'testSBG004';
+ prd.IsActive = true;
+ prd.Level_Category__c = '';
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(5);
+ insert prd;
+
+ Product_Register__c PRC = new Product_Register__c();
+ PRC.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC.MedPrdClass__c = '1';
+ PRC.RegisterNoClass_New__c = '';
+ PRC.RegisterNoClass_Old__c = '6822';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.ClinicalProductCode__c = 'YYYY';
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
+ insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '1';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today();
+ insert PRC1;
+
+
+
+ Product_Register_Link__c prl = new Product_Register_Link__c();
+ prl.Product2__c = prd.ID;
+ prl.Product_Register__c = PRC.ID;
+ insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ }
+
+ @isTest static void test_checkProduct2Level7() {
+ Product2 prd = new Product2();
+ prd.Product_ECCode__c = 'testSBG004';
+ prd.ProductCode = 'testSBG004';
+ prd.Name = 'testSBG004';
+ prd.IsActive = true;
+ prd.Level_Category__c = '';
+ prd.demoteer_Sap__c = Date.today().addDays(-3);
+ prd.Diedatvanink__c = Date.today().addDays(5);
+ insert prd;
+
+ Product_Register__c PRC = new Product_Register__c();
+ PRC.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC.MedPrdClass__c = '2';
+ PRC.RegisterNoClass_New__c = '';
+ PRC.RegisterNoClass_Old__c = '6822';
+ PRC.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC.ClinicalProductCode__c = 'YYYY';
+ PRC.ValidTo__c = Date.today().addDays(22);
+ PRC.ValidFrom__c = Date.today().addDays(-22);
+ PRC.Stelsedag__c = Date.today().addDays(1);
+ insert PRC;
+
+ Product_Register__c PRC1 = new Product_Register__c();
+ PRC1.Name = '鍥芥娉ㄨ繘20183222249';
+ PRC1.MedPrdClass__c = '2';
+ PRC1.RegisterNoClass_New__c = '';
+ PRC1.RegisterNoClass_Old__c = '6822';
+ PRC1.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
+ PRC1.ClinicalProductCode__c = 'YYYY';
+ PRC1.ValidTo__c = Date.today().addDays(22);
+ PRC1.ValidFrom__c = Date.today().addDays(-22);
+ PRC1.Stelsedag__c = Date.today();
+ insert PRC1;
+
+
+
+ Product_Register_Link__c prl = new Product_Register_Link__c();
+ prl.Product2__c = prd.ID;
+ prl.Product_Register__c = PRC.ID;
+ insert prl;
+
+ Product_Register_Link__c prl1 = new Product_Register_Link__c();
+ prl1.Product2__c = prd.ID;
+ prl1.Product_Register__c = PRC1.ID;
+ insert prl1;
+
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1