From 01ce9b5788c4369c150e57577cc4ea03b4fc5ee1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 19 四月 2024 17:28:49 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
index cfdb850..605b790 100644
--- a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
+++ b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
@@ -128,14 +128,23 @@
this.dispatchEvent(new CloseActionScreenEvent());
}
showToast(msg,type) {
- const event = new ShowToastEvent({
- title: ' ',
- message: msg,
- variant: type,
- mode: 'sticky'
- });
- this.dispatchEvent(event);
- }
+ if(type == 'success'){
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type,
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }else{
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type,
+ mode: 'sticky'
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }
updateRecordView(recordId) {
updateRecord({fields: { Id: recordId }});
}
--
Gitblit v1.9.1