From 69dc5df6ec51f6f7f6737c61d9c4c1e7757a2b96 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 17 三月 2022 21:05:08 +0800
Subject: [PATCH] PIPLFixBugs0317V1
---
force-app/main/default/classes/NewAndEditInquiryFormController.cls | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditInquiryFormController.cls b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
index b3d2e0c..1246cf2 100644
--- a/force-app/main/default/classes/NewAndEditInquiryFormController.cls
+++ b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
@@ -7,6 +7,7 @@
public String leadId{set;get;}//For Lead Lookup
public String staticResourceContact {get; set;}
public String staticResourceLead {get; set;}
+ public String urlCheckContactAWSid {get; set;}
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
@@ -26,11 +27,28 @@
staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
//Lead淇℃伅锛堟悳绱㈡煡璇uery url鐢級
staticResourceLead = JSON.serialize(PIHelper.getPIIntegrationInfo('Lead'));
+
+ checkUrl('CF00N1000000962n8_lkid','Contact');
}
-
@RemoteAction
global static Response saveInquiryForm(String leadJson,String transId,Boolean isNew) {
return save(new Inquiry_form__c(),leadJson,transId,isNew);
}
+
+ private void checkUrl(String urlStr, String sobjType){
+ Map<String, String> urlFieldMap = new Map<String, String>();
+ urlFieldMap = ApexPages.currentPage().getParameters();
+ if (urlFieldMap.containsKey(urlStr)) {
+ String sobjId = urlFieldMap.get(urlStr);
+ String soql = 'select id,AWS_Data_Id__c from ' + sobjType;
+ soql += ' where id=\'' + sobjId + '\'';
+ Sobject sobj = Database.query(soql);
+
+ Map<String, String> m = new Map<String, String>();
+ m.put((String)sobjId, (String)sobj.get('AWS_Data_Id__c'));
+
+ LookUpOverrideFieldsMapJson = JSON.serialize(m);
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1