From 29ec8b29f26b7d4b92cc75820ca7988d464c0185 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 29 三月 2022 13:39:07 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG

---
 force-app/main/default/classes/NewAndEditQISController.cls |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/NewAndEditQISController.cls b/force-app/main/default/classes/NewAndEditQISController.cls
index 94bcb4f..3ec4469 100644
--- a/force-app/main/default/classes/NewAndEditQISController.cls
+++ b/force-app/main/default/classes/NewAndEditQISController.cls
@@ -3,8 +3,24 @@
     public NewAndEditQISController(ApexPages.StandardController controller) {
         Input_Required_Field_Msg = Label.Input_Required_Field_Msg;
         List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('QIS_Report__c').getDescribe().fields.getMap().keyset());  
-        controller.addFields(fieldList);
+        if (!Test.isRunningTest()) { 
+            controller.addFields(fieldList);
+        }
         Init(controller.getRecord());
+        
+        
+
+        //Updated by Chen Yanan 20220323 Start
+        String contactId = controller.getRecord().Id;
+        if(contactId == null){
+            Map<string,string> mso = ApexPages.currentPage().getParameters();
+            system.debug('mso='+mso);
+            if(mso.containsKey('CF00N10000002FHFK_lkid')){
+                controller.getRecord().put('Name', '*');
+            }
+        }
+        system.debug('controller.getRecord()='+controller.getRecord());
+        //Updated by Chen Yanan 20220323 End
     }
 
     @RemoteAction

--
Gitblit v1.9.1