From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js | 41 ++++++++++++++++++++++-------------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
index b7ccc1f..1eb5caa 100644
--- a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
+++ b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-13 13:50:23
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-05 09:13:58
+ * @LastEditTime: 2023-10-18 21:03:42
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -36,6 +36,7 @@
init({
recordId: this.recordId
}).then(result=>{
+ console.log(result);
this.accountId = result.accountId;
this.createEvent();
}).catch(error=>{
@@ -44,27 +45,29 @@
})
}
createEvent(){
- this[NavigationMixin.Navigate]({
- type: 'standard__objectPage',
- attributes: {
- objectApiName: 'Event',
- actionName: 'new'
- },
- state: {
- // retURL: '/apex/VFClosePage',
- accid: this.accountId,
- oid: this.recordId
- }
- });
+ window.open(
+ "/apex/SimpleEventRegister?retURL=%2Fapex%2FVFClosePage&accid="
+ + this.accountId + "&oid="
+ + this.recordId + "&source=AccountPCL&save_new=1&sfdc.override=1");
this.dispatchEvent(new CloseActionScreenEvent());
}
showToast(msg,type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- 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