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/NewAndEditAgencyContactController.cls | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/NewAndEditAgencyContactController.cls b/force-app/main/default/classes/NewAndEditAgencyContactController.cls index 341550c..c2d60ca 100644 --- a/force-app/main/default/classes/NewAndEditAgencyContactController.cls +++ b/force-app/main/default/classes/NewAndEditAgencyContactController.cls @@ -1,15 +1,25 @@ global without sharing class NewAndEditAgencyContactController extends NewAndEditBaseController { public string staticResourceContact{get;private set;} + public string staticResourceAWSContact{get;private set;} + public String awsContactId{set;get;}//From agency contact's contactId global NewAndEditAgencyContactController(ApexPages.StandardController controller) { - List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Agency_Contact__c').getDescribe().fields.getMap().keyset()); // Add fields to controller. This is to avoid the SOQL error in visualforce page controller.addFields(fieldList); LookUpOverrideFields.add('Contact__c'); Init(controller.getRecord()); - PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Contact'); + if(controller.getRecord()!=null && controller.getRecord().get('Contact__c')!=null){ + String contactIdValue = (String)controller.getRecord().get('Contact__c'); + List<Contact> conList = new List<Contact>([select Id,AWS_Data_Id__c from Contact where id =:contactIdValue]); + if(conList.size()>0){ + awsContactId = conList[0].AWS_Data_Id__c; + } + } + PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Agency_Contact__c');//Updated By Lijun 20220326 staticResourceContact = JSON.serialize(piIntegration); + PIHelper.PIIntegration piConIntegration = PIHelper.getPIIntegrationInfo('Contact');//Updated By Lijun 20220326 + staticResourceAWSContact = JSON.serialize(piConIntegration); } -- Gitblit v1.9.1