| | |
| | | * @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"; |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | |
| | | 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()); |
| | | } |