From c9638718e23c9324f4a3f96338455cf7eb313518 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 11:30:41 +0800
Subject: [PATCH] 1

---
 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