From ff435968945d457f9ee653a9620fa1c7d78d2d4c Mon Sep 17 00:00:00 2001 From: 涂煌豪 <tuhuanghao@prec-tech.com> Date: 星期五, 06 五月 2022 18:17:54 +0800 Subject: [PATCH] MceConfigPDFController 修改 --- force-app/main/default/pages/NewAndEditAddress.page | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/pages/NewAndEditAddress.page b/force-app/main/default/pages/NewAndEditAddress.page index 2de0d1a..40150c4 100644 --- a/force-app/main/default/pages/NewAndEditAddress.page +++ b/force-app/main/default/pages/NewAndEditAddress.page @@ -113,7 +113,7 @@ let nodelist = document.querySelectorAll("[data-id]"); let result = {} - result.RecordTypeId = '{!rtTypeId}'; + //result.RecordTypeId = '{!rtTypeId}'; for (let index = 0; index < nodelist.length; index++) { if (VLookUpFields.has(nodelist[index].getAttribute("data-id"))) { console.log(nodelist[index].id.indexOf('lkwgt')); @@ -140,6 +140,19 @@ } } return result; + } + + function EditButton(isDisabled){ + var topele = document.getElementById('topButtonRow'); + var bottomele = document.getElementById('bottomButtonRow'); + + if (isDisabled) { + topele.classList.add("disabledbutton"); + bottomele.classList.add("disabledbutton"); + }else { + topele.classList.remove("disabledbutton"); + bottomele.classList.remove("disabledbutton"); + } } function QueryAddressFromAWS() { AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token); @@ -170,6 +183,9 @@ delete payloadJson.OwnerId; } else { payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; + } + if('{!rtTypeId}'){ + payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421 } return payloadJson; } @@ -223,6 +239,7 @@ return blankRequiredFields; } function saveAddressProcess(saveMode) { + EditButton(true); disableButtonStatus(); redirectMode = saveMode; @@ -258,6 +275,7 @@ errorMsgNode.innerText = errorMsg; errorMsgNode.className = 'pbError'; unblockUI(); + EditButton(false); } function hiddenErrorMsgNode() { let errorMsgNode = document.getElementById("page:form:block:msgContent"); @@ -276,7 +294,7 @@ //1. Check account value let accountNodeId = document.querySelector("[data-id='Customer__c']").id + '_lkid'; let accountValue = document.getElementById(accountNodeId).value; - let searchContactKeyWord = document.querySelector("[data-id='Customer__c']").value; + let searchContactKeyWord = document.querySelector("[data-id='Contacts__c']").value; console.log(accountValue); if (accountValue != '000000000000000') { let baseUrl = "/apex/SearchContactPage"; -- Gitblit v1.9.1