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 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/pages/NewOnCall.page b/force-app/main/default/pages/NewOnCall.page
index 232d675..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,7 +149,7 @@
//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
--
Gitblit v1.9.1