From 3ba0123db48f8bab81ddf0913e1b95280ef545e8 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 31 三月 2022 17:56:53 +0800
Subject: [PATCH] Deploy0331
---
force-app/main/default/classes/NewAndEditInquiryFormController.cls | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditInquiryFormController.cls b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
index 83308e8..64380cf 100644
--- a/force-app/main/default/classes/NewAndEditInquiryFormController.cls
+++ b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
@@ -8,6 +8,8 @@
public String staticResourceContact {get; set;}
public String staticResourceLead {get; set;}
public String urlCheckContactAWSid {get; set;}
+ public String contactAWSDataId{set;get;}
+ public String contactName{set;get;}
public NewAndEditInquiryFormController(ApexPages.StandardController controller) {
List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Inquiry_form__c').getDescribe().fields.getMap().keyset());
// Add fields to controller. This is to avoid the SOQL error in visualforce page
@@ -24,6 +26,22 @@
if(obj.Id == null){
//鍒濆鍖栧姞杞藉��
obj.put('OwnerId',UserInfo.getUserId());
+ }else {
+ //鑱旂郴浜虹殑Id
+ Inquiry_form__c ifc = [select Contact_Name__c from Inquiry_form__c where id=:obj.Id];
+ if(ifc != null){
+ List<Contact> c = [select AWS_Data_Id__c,Name from Contact where id=:ifc.Contact_Name__c];
+ if(c.size()>0){
+ if (c[0].AWS_Data_Id__c != null && c[0].AWS_Data_Id__c != '') {
+ contactAWSDataId = c[0].AWS_Data_Id__c;
+ }else {
+ contactName = c[0].Name;
+ }
+ }
+ }else {
+ contactAWSDataId = '鏃�';
+ contactName = '鏃�';
+ }
}
//contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級
staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
--
Gitblit v1.9.1