import { LightningElement,api, track, wire } from 'lwc'; import {CurrentPageReference} from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { NavigationMixin } from 'lightning/navigation'; import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; export default class LexSpecilaApplyCreate extends NavigationMixin(LightningElement) { @api oppId; @api oppName; @api oppForecastStatus; msg; IsLoading = true; connectedCallback(){ // const defaultValues = encodeDefaultFieldValues({ // Opportunity__c: this.oppId, // 关联主记录 ID // Apply_Content_Old__c: this.oppForecastStatus == undefined ? '' : this.oppForecastStatus // }); this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'OpportunitySpecialApply__c', actionName: 'new' }, // state: { // defaultFieldValues: defaultValues, // RecordTypeId: '01210000000gTCW' // } }); // var url = 'a3W/e?RecordType=01210000000gTCW&CF00N10000008qvFQ='+ encodeURIComponent(this.oppName) + '&CF00N10000008qvFQ_lkid='+ encodeURIComponent(this.oppId) + '&00N10000008qvFX='+ encodeURIComponent(this.oppForecastStatus)+'&retURL='+ encodeURIComponent(this.oppId); // window.location.href = url; } }