From 65a3de8fc057c6550f38d2aef6b5ed7f0e7e2f81 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期一, 15 四月 2024 09:55:08 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
index ed8f724..7b43a5b 100644
--- a/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
+++ b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-05-15 11:14:32
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-04 13:16:23
+ * @LastEditTime: 2023-09-21 17:13:37
*/
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -13,6 +13,8 @@
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP from '@salesforce/label/c.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexAssignTaskButton extends NavigationMixin(LightningElement) {
@api recordId;
accountName;
@@ -35,6 +37,9 @@
}
}
connectedCallback(){
+ Promise.all([
+ loadStyle(this, lwcCSS)
+ ]);
init({
recordId: this.recordId
}).then(result=>{
@@ -75,17 +80,25 @@
taskDifferent__c: '涓婄骇鍒嗛厤浠诲姟',
Name: '*'
});
+ let states =
+ {
+ nooverride: '1',
+ navigationLocation: 'LIST_VIEW',
+ // backgroundContext: '/lightning/o/Account/list?filterName=Recent&0.source=alohaHeader',
+ backgroundContext: '/lightning/r/Opportunity/'+this.recordId+'/view',
+ defaultFieldValues: defaultValues,
+ };
+
+ // states['recordTypeId'] = this.recordTypeId;
+ states['useRecordTypeCheck'] = true;
+
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'task__c',
actionName: 'new'
},
- state: {
- nooverride: '1',
- defaultFieldValues: defaultValues,
- recordTypeId: this.recordTypeId
- }
+ state: states
});
this.dispatchEvent(new CloseActionScreenEvent());
}
--
Gitblit v1.9.1