import { LightningElement,wire,track,api} from 'lwc'; import { CurrentPageReference } from "lightning/navigation"; import { CloseActionScreenEvent } from 'lightning/actions'; import { NavigationMixin } from 'lightning/navigation'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import init from '@salesforce/apex/CaseController.initForlexInputSolutionButton'; import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner'; import { updateRecord } from 'lightning/uiRecordApi'; export default class lexInputSolution extends LightningElement { @api recordId; IsLoading = true; inquirydetail; answerdetailcontent; @wire(CurrentPageReference) getStateParameters(currentPageReference) { console.log(111); console.log(currentPageReference); if (currentPageReference) { const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; console.log("str"); console.log(str); this.recordId = str; } } } connectedCallback () { init({ recordId: this.recordId }).then(result => { this.IsLoading = false; this.inquirydetail = result.inquirydetail; this.answerdetailcontent = result.answerdetailcontent; var url = "/501/e?retURL="+this.recordId+ "&SolutionName="+this.inquirydetail+ "&00N10000003MXPAEA4="+this.answerdetailcontent; window.open(url); }).catch(error => { console.log('error='+error); }).finally(() => { }); } }