From f127c76b19f5316032d4bed127a1dde710c48d74 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期四, 24 三月 2022 10:10:36 +0800 Subject: [PATCH] PIPLFunctionFixBug0324 --- force-app/main/default/pages/NewAndEditASEActivity.page | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/pages/NewAndEditASEActivity.page b/force-app/main/default/pages/NewAndEditASEActivity.page index 8017b88..e13349b 100644 --- a/force-app/main/default/pages/NewAndEditASEActivity.page +++ b/force-app/main/default/pages/NewAndEditASEActivity.page @@ -1,3 +1,10 @@ +<!-- + @description : + @author : ChangeMeIn@UserSettingsUnder.SFDoc + @group : + @last modified on : 03-23-2022 + @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc +--> <apex:page standardController="ASEActivity__c" extensions="NewAndEditASEActivityController" id="page"> <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script> @@ -397,10 +404,11 @@ accountValue = document.getElementById(accountNodeId).value; } console.log('accountValue = ' + accountValue); + let searchContactKeyWord = document.querySelector("[data-id='ReporterASE__c']").value; if(accountValue !='000000000000000'){ - suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue; + suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord; }else{ - suffixUrl = "?contactId="+contactNodeId; + suffixUrl = "?contactId="+contactNodeId+"&searchContactKeyWord=" + searchContactKeyWord; } let baseUrl = "/apex/SearchContactPage"; let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no'; @@ -561,6 +569,7 @@ replaceSearchContactLookup(); document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton"); jQuery('a[data-id="OwnerId"]').remove(); + /* jQuery(".lookupInput").each(function(i,e){ let je =jQuery(e).find('input'); je.attr("readonly",""); @@ -590,6 +599,24 @@ } } }); + */ + let previous_value = {}; + jQuery(".lookupInput input").each(function(i,e){ + let je =jQuery(e); + + let dataid = je.attr('data-id'); + if(['ContactId'].indexOf(dataid) < 0) return; + + jQuery(e).focus(function(){ + previous_value[this.id] = this.value; + }) + + jQuery(e).change(function(){ + if (previous_value[this.id] != jQuery(this).val()) { + document.getElementById(this.id+'_lkid').value = ''; + } + }) + }) }); </script> <div class="pbBottomButtons"> -- Gitblit v1.9.1