From f5a94e721ae5a26f817f0df75065b64f1f192eb3 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期一, 28 三月 2022 21:43:51 +0800
Subject: [PATCH] PIPLFunctionDeploy0328

---
 force-app/main/default/pages/SearchVisitor.page |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/pages/SearchVisitor.page b/force-app/main/default/pages/SearchVisitor.page
index 09049f0..c5aeee8 100644
--- a/force-app/main/default/pages/SearchVisitor.page
+++ b/force-app/main/default/pages/SearchVisitor.page
@@ -155,7 +155,7 @@
             //2. inovke aws service
             let contactAwsIds = new Set();
             for(var key in contactInfo){
-                if(contactInfo[key].lastName.includes(searchByLastName)){
+                if(contactInfo[key].lastName.indexOf(searchByLastName) != -1){
                     contactAwsIds.add(key);
                 }
             }
@@ -283,8 +283,10 @@
             ProcessPIForAWS({},GetEditObj());
         }
         function Trans(){
+            console.log('SFRcordId:'+document.getElementById('Page:mainForm:sfContactId').value);
             AWSService.postAWS(staticResources.transactionUrl,AWSService.confirmTrans, JSON.stringify({
                     "txId":aws_result.txId,
+                    "sfRecordId":document.getElementById('Page:mainForm:sfContactId').value,
                     "isSuccess":1
             }), function(result){
                 window.location.reload();
@@ -326,7 +328,7 @@
         <apex:actionFunction name="editVistor" action="{!editVistor}" rerender="idRegistration" oncomplete="assignDencrypted();setButtonDisable(document.getElementById('Page:mainForm:idSearchVisitor:idRegSave'), false);">
             <apex:param name="index" assignTo="{!index}" value=""/>
         </apex:actionFunction>
-        <apex:actionFunction name="saveNew" action="{!regContact}" rerender="idRegistration,idRezultVisitor,idAddVisitor,idMessage" onComplete="Trans();">
+        <apex:actionFunction name="saveNew" action="{!regContact}" rerender="idRegistration,idRezultVisitor,idAddVisitor,idMessage,sfContactId" onComplete="Trans()">
         </apex:actionFunction>
          <!-- Add By Li Jun for PIPL 20220228 Start -->
          <apex:inputHidden id="LastName_Encrypted__c" value="{!rc.LastName_Encrypted__c}"/>
@@ -336,6 +338,7 @@
          <apex:inputHidden id="Doctor_Division1_Encrypted__c" value="{!rc.Doctor_Division1_Encrypted__c}"/>
 
          <apex:inputHidden id="AWS_Data_Id__c" value="{!rc.AWS_Data_Id__c}"/>
+         <apex:inputHidden id="sfContactId" value="{!sfContactId}"/>
          <!-- Add By Li Jun for PIPL 20220221 End -->
             <apex:pageBlock id="idSearchVisitor" >
                 <table width="1060" height="50" border="0">

--
Gitblit v1.9.1