From 51fb56f3f5b0dc96d7f93a71f9b61263e303243f Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期二, 10 五月 2022 15:12:45 +0800
Subject: [PATCH] Fix Edit Record Without AWSId
---
force-app/main/default/pages/NewOnCall.page | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/pages/NewOnCall.page b/force-app/main/default/pages/NewOnCall.page
index 75f7d05..4a269e6 100644
--- a/force-app/main/default/pages/NewOnCall.page
+++ b/force-app/main/default/pages/NewOnCall.page
@@ -60,6 +60,9 @@
} else {
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
}
+ if('{!sfRecordIdForEdit}'){
+ payloadJson.Id = '{!sfRecordIdForEdit}';
+ }
if('{!rtTypeId}'){
payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421
}
@@ -146,14 +149,16 @@
//Insert Sensitive Information to AWS
function NewPIToAWS(onCallJson, payloadForNewPI) {
let controllerSaveMethod = '{!$RemoteAction.OnCallController.saveOnCall}';
- AWSService.insert(staticResources.newUrl, onCallJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack, redirectCallBack);
+ AWSService.insert(staticResources.newUrl, onCallJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl,{!isNewMode}, insertOrUpdateBack, redirectCallBack);
}
//Check Required Fields
function checkRequiredFieldMsg(formData) {
let blankRequiredFields = '';
for (i = 0; i < requiredFieldAPIList.length; i++) {
- if (formData[requiredFieldAPIList[i]]) {
+ if (formData[requiredFieldAPIList[i]] && !VLookUpFields.has(requiredFieldAPIList[i])) {
+ continue;
+ }else if(VLookUpFields.has(requiredFieldAPIList[i]) && formData[requiredFieldAPIList[i]] != '000000000000000'){
continue;
} else {
if (blankRequiredFields == '') {
--
Gitblit v1.9.1