From ca51336f247021aa79b8863522e15e8dee957e19 Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 21 三月 2022 10:19:49 +0800
Subject: [PATCH] 盘点Copy邮件标头修改
---
force-app/main/default/classes/NewAndEditLeadController.cls | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditLeadController.cls b/force-app/main/default/classes/NewAndEditLeadController.cls
index 1ce6a1e..aad9534 100644
--- a/force-app/main/default/classes/NewAndEditLeadController.cls
+++ b/force-app/main/default/classes/NewAndEditLeadController.cls
@@ -15,10 +15,12 @@
public Boolean isNewMode{set;get;}
public String rtTypeId {get; set;}
public String AWSDataId{set;get;}
+ public String AWSDataIdInquiryForm{set;get;}
public String contactId{set;get;}//For Lookup field
public List<String> encryptedAPIList{set;get;}
public String staticResource {get; set;}
public String staticResourceContact {get; set;}
+ public String staticResourceInquiryForm{get; set;}
public String requiredFieldAPIListStr {get; set;}
public String fieldAPIToLabelMapStr {get; set;}
public String Input_Required_Field_Msg{set;get;}
@@ -27,7 +29,12 @@
public String sobjectPrefix{set;get;}
public String sobjecttypeForFrontEnd{set;get;}
public String contactsInfo {set;get;}//key sfid;value awsid
+ public Inquiry_form__c ifc{get; private set;}
+ public String contactDataId{get; set;}
+ public String layoutSectionsStr {get; set;}
+ public String isQueryContact{get; set;}
public NewAndEditLeadController(ApexPages.StandardController controller) {
+ isQueryContact = '0';
isNewMode = true;
Input_Required_Field_Msg = Label.Input_Required_Field_Msg;
PIPL_Name_Label = Label.PIPL_Name_Label;
@@ -37,8 +44,22 @@
List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Lead').getDescribe().fields.getMap().keyset());
// Add fields to controller. This is to avoid the SOQL error in visualforce page
controller.addFields(fieldList);
- SObject obj = controller.getRecord();
- if(obj.Id != null){
+ SObject obj = controller.getRecord();
+
+ if(ApexPages.currentPage().getParameters().get('CF00N1000000962np_lkid') != null){
+ System.debug('CF00N1000000962np_lkid');
+ //浜у搧鍜ㄨ鍗曡繃鏉ョ殑
+ String InquiryFormId = ApexPages.currentPage().getParameters().get('CF00N1000000962np_lkid');
+ ifc = [select Id,AWS_Data_Id__c,Contact_Name__c,Contact_Id__c,Hospital_Name__c,Hospital_ID__c,Department_Class__c,Department_ID__c,Opp_Name_Search__c,Opp_Name_Search_ID__c,Campaign__c,
+ Campaign_ID__c,Name,Cancel_Reason__c,Phone__c,Email__c,Last_Name__c,LeadSource__c,Opportunity_Division__c,Request1__c,
+ Urgent__c from Inquiry_form__c where id = :InquiryFormId];
+ Contact c = [select AWS_Data_Id__c from Contact where id = :ifc.Contact_Id__c];
+ contactDataId = c.AWS_Data_Id__c;
+ AWSDataIdInquiryForm = ifc.AWS_Data_Id__c;
+ System.debug('ifc = ' + ifc);
+ rtTypeId = ApexPages.currentPage().getParameters().get('RecordType');
+ obj.put('OwnerId',UserInfo.getUserId());
+ }else if(obj.Id != null){
//鏇存柊
isNewMode = false;
Lead leadData = [select Id,RecordTypeId,AWS_Data_Id__c,Contact_Name__r.Id,Contact_Name__r.AWS_Data_Id__c from Lead where id =: obj.Id];
@@ -49,6 +70,18 @@
sfIdToAWSIdMap.put(String.valueof(leadData.Contact_Name__r.Id).subString(0,15),leadData.Contact_Name__r.AWS_Data_Id__c);
}
contactsInfo = JSON.serialize(sfIdToAWSIdMap);
+ }else if(ApexPages.currentPage().getParameters().get('CF00N10000006ps6f_lkid') != null){
+ //鑱旂郴浜鸿繃鏉ョ殑鐐瑰嚮鏂板缓鎰忓悜
+ isQueryContact = '1';
+ String contactId = ApexPages.currentPage().getParameters().get('CF00N10000006ps6f_lkid');
+ Contact contactTemp = [select Id,RecordTypeId,AWS_Data_Id__c from Contact where id =:contactId];
+ Map<String,String> sfIdToAWSIdMap = new Map<String,String>();
+ if(contactTemp.Id != null){
+ sfIdToAWSIdMap.put(String.valueof(contactTemp.Id).subString(0,15),contactTemp.AWS_Data_Id__c);
+ }
+ contactsInfo = JSON.serialize(sfIdToAWSIdMap);
+ rtTypeId = ApexPages.currentPage().getParameters().get('RecordType');
+ obj.put('OwnerId',UserInfo.getUserId());
}else{
//鏂板缓
rtTypeId = ApexPages.currentPage().getParameters().get('RecordType');
@@ -63,8 +96,10 @@
PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Lead');
staticResource = JSON.serialize(piIntegration);
staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
+ staticResourceInquiryForm = JSON.serialize(PIHelper.getPIIntegrationInfo('Inquiry_form__c'));
encryptedAPIList = piIntegration.PIFields;
sobjectPrefix = piIntegration.sobjectPrefix;
+ layoutSectionsStr = JSON.serialize(layoutSections);
}
global class Response{
--
Gitblit v1.9.1